leptris 1.9.353.0-arm-linux → 1.9.354.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +26 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/common/string_view.c +8 -5
- data/vendor-src/libleptris/src/leptris/dom/element_index.c +6 -2
- data/vendor-src/libleptris/src/leptris/leptris.c +3 -3
- data/vendor-src/libleptris/src/leptris/rng/validate.c +5 -5
- data/vendor-src/libleptris/src/leptris/sch/schematron.c +2 -1
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_path.c +2 -2
- data/vendor-src/libleptris/src/leptris/xpath/vm.c +1 -1
- data/vendor-src/libleptris/src/leptris/xpath/xpath_public.c +3 -2
- data/vendor-src/libleptris/src/leptris/xslt/xslt_exec.c +4 -2
- data/vendor-src/libleptris/src/leptris/xslt/xslt_functions.c +5 -2
- data/vendor-src/libleptris/src/leptris/xslt/xslt_parse.c +4 -2
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4934e78f0b0c6b08aca5f8574d6cc262453a67f3238705c951d7c0e79c5a8f9f
|
|
4
|
+
data.tar.gz: eb97994c93bb47b928cba5f92057469962a901445345801e55af5c9e804718c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f8b44470d831bfe5c988a3175d58371308194eb734520d2765e26126112c9fec2ed8bb5c9c516c9b77dcfaf66e9efa0e1e6d3f07cbf3558e950c69f4627dc15
|
|
7
|
+
data.tar.gz: 94cf2b038a54dd48a43fe3657d191b3f970052bb749de82cc10a1880fda75632163cb51d633a8ca6630ebd70e92f9272f93802de3dde91090b171c9263c6851b
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.354"
|
|
12
12
|
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
13
|
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
14
|
# install name, loaded by ffi.rb before libleptris so the
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.354] - 2026-10-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **wasm32/ILP32 portability: 64-bit hash accumulators + enum
|
|
8
|
+
discipline (PR #1697).** The emscripten build (wasm32: size_t and
|
|
9
|
+
uintptr_t are 32-bit) exposed a class the LP64 host lanes never
|
|
10
|
+
see — 17 warnings, all real. The 64-bit FNV-1a basis/prime
|
|
11
|
+
constants sat in size_t, so on 32-bit targets the hash silently
|
|
12
|
+
stopped being FNV-1a (string_view, element_index, xslt_parse);
|
|
13
|
+
accumulators are now uint64_t with one fold at the return.
|
|
14
|
+
acc_ptr_hash shifted a uintptr_t by 33 — UB on 32-bit pointers;
|
|
15
|
+
promoted to 64-bit with the full avalanche. The leptris_set_error
|
|
16
|
+
call sites passed LeptrisStatus constants into the internal
|
|
17
|
+
error-code channel (TODO 98's boundary) — the implicit enum
|
|
18
|
+
casts are explicit at the five sites. LeptrisNodeKind vs
|
|
19
|
+
LeptrisNodeType compares (and the result-type compare) cast
|
|
20
|
+
through int where the same-valued members meet. rng diag calls
|
|
21
|
+
passed arguments the format string never used. emcc: 17 warnings
|
|
22
|
+
-> 0; wasm test gate 5/5; host suite green.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- (describe changes here)
|
|
27
|
+
|
|
28
|
+
|
|
3
29
|
## [1.9.353] - 2026-10-14
|
|
4
30
|
|
|
5
31
|
### Added
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#include "../memory/pool.h"
|
|
2
2
|
#include "string_view.h"
|
|
3
|
+
#include <stdint.h>
|
|
3
4
|
#include <string.h>
|
|
4
5
|
#include <stdlib.h>
|
|
5
6
|
#include <stdio.h>
|
|
@@ -133,15 +134,17 @@ int leptris_sv_equals_cstr(const LeptrisStringView* sv, const char* str) {
|
|
|
133
134
|
size_t leptris_sv_hash(const LeptrisStringView* sv) {
|
|
134
135
|
if (!sv || !sv->data) return 0;
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
/* FNV-1a 64: the accumulator stays uint64_t — size_t is
|
|
138
|
+
* 32-bit on wasm32/ILP32, and truncating the basis/prime
|
|
139
|
+
* silently changes the algorithm. Fold once at the return. */
|
|
140
|
+
uint64_t hash = 14695981039346656037ULL;
|
|
141
|
+
const uint64_t FNV_prime = 1099511628211ULL;
|
|
140
142
|
for (size_t i = 0; i < sv->length; i++) {
|
|
141
143
|
hash ^= (unsigned char)sv->data[i];
|
|
142
144
|
hash *= FNV_prime;
|
|
143
145
|
}
|
|
144
|
-
|
|
146
|
+
hash ^= hash >> 32;
|
|
147
|
+
return (size_t)hash;
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
/* Convert to NULL-terminated C string (allocates!) */
|
|
@@ -43,11 +43,15 @@ typedef struct {
|
|
|
43
43
|
|
|
44
44
|
static size_t index_key_hash(const char* s1, size_t l1,
|
|
45
45
|
const char* s2, size_t l2) {
|
|
46
|
-
size_t
|
|
46
|
+
/* uint64 accumulator: size_t is 32-bit on wasm32/ILP32 and the
|
|
47
|
+
* 64-bit constants would truncate (the multiply lane collapses).
|
|
48
|
+
* Fold once at the return. */
|
|
49
|
+
uint64_t h = 1469598103934665603ull;
|
|
47
50
|
for (size_t i = 0; i < l1; i++) { h ^= (unsigned char)s1[i]; h *= 1099511628211ull; }
|
|
48
51
|
for (size_t i = 0; i < l2; i++) { h ^= (unsigned char)s2[i]; h *= 1099511628211ull; }
|
|
49
52
|
h ^= l1; h *= 1099511628211ull;
|
|
50
|
-
|
|
53
|
+
h ^= h >> 32;
|
|
54
|
+
return (size_t)h;
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
static void index_key_table_free(IndexKeyTable* t) {
|
|
@@ -275,7 +275,7 @@ LEPTRIS_API LeptrisStatus leptris_document_set_root_ex(
|
|
|
275
275
|
LeptrisElement* out_installed) {
|
|
276
276
|
if (out_installed) *out_installed = NULL;
|
|
277
277
|
if (!doc || !root) {
|
|
278
|
-
leptris_set_error(LEPTRIS_ERROR_NULL_ARG,
|
|
278
|
+
leptris_set_error((leptris_error_code)LEPTRIS_ERROR_NULL_ARG,
|
|
279
279
|
"set_root: NULL document or element");
|
|
280
280
|
return LEPTRIS_ERROR_NULL_ARG;
|
|
281
281
|
}
|
|
@@ -283,7 +283,7 @@ LEPTRIS_API LeptrisStatus leptris_document_set_root_ex(
|
|
|
283
283
|
/* Already attached under a parent? (parent_off == 0 encodes NULL;
|
|
284
284
|
* leptris_elem_parent is the static inline accessor from dom/element.h) */
|
|
285
285
|
if (leptris_elem_parent(root)) {
|
|
286
|
-
leptris_set_error(LEPTRIS_ERROR_INVALID_ARG,
|
|
286
|
+
leptris_set_error((leptris_error_code)LEPTRIS_ERROR_INVALID_ARG,
|
|
287
287
|
"set_root: element is attached to a parent");
|
|
288
288
|
return LEPTRIS_ERROR_INVALID_ARG;
|
|
289
289
|
}
|
|
@@ -301,7 +301,7 @@ LEPTRIS_API LeptrisStatus leptris_document_set_root_ex(
|
|
|
301
301
|
if (leptris_element_get_document(root) != doc) {
|
|
302
302
|
LeptrisElement copy = leptris_element_copy(root, doc);
|
|
303
303
|
if (!copy) {
|
|
304
|
-
leptris_set_error(LEPTRIS_ERROR_MEMORY,
|
|
304
|
+
leptris_set_error((leptris_error_code)LEPTRIS_ERROR_MEMORY,
|
|
305
305
|
"set_root: adoption copy failed");
|
|
306
306
|
return LEPTRIS_ERROR_MEMORY;
|
|
307
307
|
}
|
|
@@ -512,8 +512,8 @@ static size_t match_seq(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
|
512
512
|
case RNG_REF: {
|
|
513
513
|
RngDefine* d = find_define(v->g, p->name);
|
|
514
514
|
if (!d || !d->body) {
|
|
515
|
-
diag(v, LEPTRIS_DIAG_INVALID,
|
|
516
|
-
|
|
515
|
+
diag(v, LEPTRIS_DIAG_INVALID, NULL,
|
|
516
|
+
"reference to undefined pattern '%s'", p->name);
|
|
517
517
|
return (size_t)-1;
|
|
518
518
|
}
|
|
519
519
|
if (v->depth > 200) {
|
|
@@ -1854,9 +1854,9 @@ int rng_validate_document(struct leptris_relaxng* rng, LeptrisDocument doc) {
|
|
|
1854
1854
|
RngDefine* d = find_define(v.g, start->name);
|
|
1855
1855
|
if (!d || !d->body) {
|
|
1856
1856
|
v.quiet = 0;
|
|
1857
|
-
diag(&v, LEPTRIS_DIAG_INVALID,
|
|
1858
|
-
|
|
1859
|
-
start->name
|
|
1857
|
+
diag(&v, LEPTRIS_DIAG_INVALID, root,
|
|
1858
|
+
"reference to undefined pattern '%s'",
|
|
1859
|
+
start->name);
|
|
1860
1860
|
rng->error = leptris_strdup(v.err);
|
|
1861
1861
|
return 0;
|
|
1862
1862
|
}
|
|
@@ -1129,7 +1129,8 @@ LEPTRIS_API LeptrisSchematron leptris_schematron_parse_phase(
|
|
|
1129
1129
|
&err);
|
|
1130
1130
|
leptris_document_free(doc);
|
|
1131
1131
|
if (!s) {
|
|
1132
|
-
leptris_set_error(LEPTRIS_ERROR_PARSE,
|
|
1132
|
+
leptris_set_error((leptris_error_code)LEPTRIS_ERROR_PARSE,
|
|
1133
|
+
err ? err : "bad");
|
|
1133
1134
|
free(err);
|
|
1134
1135
|
if (status) *status = LEPTRIS_ERROR_PARSE;
|
|
1135
1136
|
return NULL;
|
|
@@ -904,8 +904,8 @@ struct leptris_xpath_result* evaluate_step(XPathContext* ctx,
|
|
|
904
904
|
DEBUG_LOG(" Axis '%s' cannot operate on attribute nodes, skipping", axis_name);
|
|
905
905
|
continue; /* Skip non-element nodes for other axes */
|
|
906
906
|
}
|
|
907
|
-
} else if (node_ptr && ((LeptrisNode*)node_ptr)->type ==
|
|
908
|
-
LEPTRIS_NODE_NAMESPACE) {
|
|
907
|
+
} else if (node_ptr && (int)((LeptrisNode*)node_ptr)->type ==
|
|
908
|
+
(int)LEPTRIS_NODE_NAMESPACE) {
|
|
909
909
|
/* Synthetic namespace nodes: parent/ancestor axes
|
|
910
910
|
* resolve through the OWNER element (bug-63); self
|
|
911
911
|
* is the ns node itself. */
|
|
@@ -769,7 +769,7 @@ struct leptris_xpath_result* vm_apply_axis_parent(XPathContext* ctx, XPathVM* vm
|
|
|
769
769
|
for (size_t i = 0; i < input->count; i++) {
|
|
770
770
|
LeptrisNode* in = input->nodes[i];
|
|
771
771
|
LeptrisElement parent;
|
|
772
|
-
if (in && in->type == LEPTRIS_NODE_NAMESPACE) {
|
|
772
|
+
if (in && (int)in->type == (int)LEPTRIS_NODE_NAMESPACE) {
|
|
773
773
|
/* Namespace nodes' parent is the OWNER element (63). */
|
|
774
774
|
parent = ((LeptrisNamespaceNode*)in)->owner;
|
|
775
775
|
} else if (node_is_element(in)) {
|
|
@@ -89,7 +89,7 @@ LEPTRIS_API LeptrisXPathResult leptris_xpath_eval_versioned(
|
|
|
89
89
|
if (version == LEPTRIS_XPATH_10 &&
|
|
90
90
|
x10_has_3x_syntax(expression)) {
|
|
91
91
|
leptris_set_error(
|
|
92
|
-
LEPTRIS_ERROR_INVALID_ARG,
|
|
92
|
+
(leptris_error_code)LEPTRIS_ERROR_INVALID_ARG,
|
|
93
93
|
"XPath 3.x syntax rejected in LEPTRIS_XPATH_10 mode");
|
|
94
94
|
if (status) *status = LEPTRIS_ERROR_INVALID_ARG;
|
|
95
95
|
return NULL;
|
|
@@ -1133,7 +1133,8 @@ LEPTRIS_API LeptrisXPathResult leptris_xpath_compiled_eval_nodeset(
|
|
|
1133
1133
|
struct leptris_xpath_result* r =
|
|
1134
1134
|
leptris_xpath_compiled_eval(compiled, doc, contexts[i]);
|
|
1135
1135
|
if (!r) continue;
|
|
1136
|
-
if (r->type == LEPTRIS_XPATH_NODESET &&
|
|
1136
|
+
if ((int)r->type == (int)LEPTRIS_XPATH_NODESET &&
|
|
1137
|
+
r->value.nodeset_value) {
|
|
1137
1138
|
XPathNodeSet* ns = r->value.nodeset_value;
|
|
1138
1139
|
for (size_t j = 0; j < ns->count; j++)
|
|
1139
1140
|
xpath_nodeset_add(merged, ns->nodes[j]);
|
|
@@ -2582,7 +2582,8 @@ static int op_copy(XsltExec* ex, const XsltInstr* in, LeptrisElement node) {
|
|
|
2582
2582
|
/* §7.5: copying an ATTRIBUTE (re)binds it on the pending
|
|
2583
2583
|
* parent — later copies override earlier xsl:attribute values
|
|
2584
2584
|
* (execution order wins, §7.1.3). */
|
|
2585
|
-
if (node && ((LeptrisNode*)node)->type ==
|
|
2585
|
+
if (node && (int)((LeptrisNode*)node)->type ==
|
|
2586
|
+
(int)LEPTRIS_NODE_ATTRIBUTE) {
|
|
2586
2587
|
LeptrisAttributeNode* a = (LeptrisAttributeNode*)node;
|
|
2587
2588
|
if (ex->pending_parent && a->name)
|
|
2588
2589
|
leptris_element_set_attribute(ex->pending_parent,
|
|
@@ -2592,7 +2593,8 @@ static int op_copy(XsltExec* ex, const XsltInstr* in, LeptrisElement node) {
|
|
|
2592
2593
|
}
|
|
2593
2594
|
/* §7.5: copy of a NAMESPACE node declares it on the pending
|
|
2594
2595
|
* parent (the classic copy-the-namespaces idiom). */
|
|
2595
|
-
if (node && ((LeptrisNode*)node)->type ==
|
|
2596
|
+
if (node && (int)((LeptrisNode*)node)->type ==
|
|
2597
|
+
(int)LEPTRIS_NODE_NAMESPACE) {
|
|
2596
2598
|
LeptrisNamespaceNode* ns = (LeptrisNamespaceNode*)node;
|
|
2597
2599
|
/* The implicit xml prefix is always in scope — copying it
|
|
2598
2600
|
* would emit a redundant xmlns:xml (libxslt omits it). */
|
|
@@ -609,10 +609,13 @@ static struct leptris_xpath_result* acc_result_copy(
|
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
static size_t acc_ptr_hash(const void* p) {
|
|
612
|
-
uintptr_t
|
|
612
|
+
/* 64-bit promote: uintptr_t is 32-bit on wasm32/ILP32 and the
|
|
613
|
+
* >> 33 shift was UB there (the avalanche assumes 64 bits). */
|
|
614
|
+
uint64_t h = (uint64_t)(uintptr_t)p;
|
|
613
615
|
h ^= h >> 33;
|
|
614
|
-
h *=
|
|
616
|
+
h *= 0x9E3779B97F4A7C15ULL;
|
|
615
617
|
h ^= h >> 29;
|
|
618
|
+
h ^= h >> 32;
|
|
616
619
|
return (size_t)h;
|
|
617
620
|
}
|
|
618
621
|
|
|
@@ -1857,9 +1857,11 @@ static void free_instr_list(XsltInstr* list) {
|
|
|
1857
1857
|
* full linear scan produced. Mode buckets: candidate arrays per
|
|
1858
1858
|
* distinct mode, preserving sheet order. */
|
|
1859
1859
|
static size_t tpl_name_hash(const char* s) {
|
|
1860
|
-
size_t
|
|
1860
|
+
/* uint64 accumulator: size_t is 32-bit on wasm32/ILP32. */
|
|
1861
|
+
uint64_t h = 1469598103934665603ull;
|
|
1861
1862
|
while (*s) { h ^= (unsigned char)*s++; h *= 1099511628211ull; }
|
|
1862
|
-
|
|
1863
|
+
h ^= h >> 32;
|
|
1864
|
+
return (size_t)h;
|
|
1863
1865
|
}
|
|
1864
1866
|
|
|
1865
1867
|
void xslt_sheet_build_dispatch(XsltStylesheet* sheet) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.354",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|