PureXML/Sources
Mihaela Mihaljevic 3e4ca0cce3
perf(schema): bound content-model expansion depth so deep chains cannot overflow the stack (#372)
Two constructs are flat in the schema document, so they escape the parser's element-nesting maxDepth (256) yet make a content model arbitrarily deep once compiled: a <xs:group ref> chain and a complexContent derivation chain (the definitions are siblings). The particle compiler inlines each group reference and composes each derivation once per link, overflowing the stack on a long chain. The expanded depth is now bounded by one counter (XSDContext.expansionDepth, incremented at each compositor level, group-reference expansion, and derivation step) against maximumContentModelExpansionDepth (512); a model past the bound is rejected with a located error, not crashed. The counter lives in a value-type context so it tracks depth not width (no width false positive), and the rejection is harvested into the schema's errors (no silent truncation). Verified conformance-neutral over the full W3C XSTS corpus (all four buckets unchanged), the libxml2 determinism differential unchanged, and the full suite; an adversarial critic found the derivation-chain gap, which this fixes with the same counter.
2026-06-29 01:54:21 +02:00
..
Canonical perf(canonical): make the prefix rewrite and node-subset emit depth-safe (#355) 2026-06-27 17:08:37 +02:00
Catalog feat(catalog): honor group-level prefer override 2026-06-08 18:05:03 +02:00
Emitting perf(serialize): scan bytes, not graphemes, to find characters to escape (#297) 2026-06-25 15:39:20 +02:00
HTML perf(html): make HTML serialization depth-safe (#353) 2026-06-27 16:22:54 +02:00
Model fix(xpath): make string-value extraction iterative and comment-correct (#351) 2026-06-26 20:44:49 +02:00
Parsing perf(parsing): resolve namespaces in O(1), making parse linear in depth (#346) 2026-06-26 17:44:27 +02:00
Pattern feat(pattern): streaming xmlPattern matching 2026-06-08 05:49:13 +02:00
Regex docs(schema): disclose the contested-corpus basis for rejecting unescaped [ (#250) 2026-06-23 03:34:38 +02:00
Schema perf(schema): bound content-model expansion depth so deep chains cannot overflow the stack (#372) 2026-06-29 01:54:21 +02:00
Stream chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Validation perf: make tree-to-tree transforms depth-safe (DTD defaults, canonicalization) (#352) 2026-06-26 19:27:37 +02:00
XInclude perf(xinclude): make XInclude processing depth-safe (#354) 2026-06-27 16:55:03 +02:00
XPath fix(xpath): make string-value extraction iterative and comment-correct (#351) 2026-06-26 20:44:49 +02:00
XPointer perf(xpointer): linear-time string-range() search (#314) 2026-06-26 04:01:41 +02:00
XSLT perf(xslt): make the template evaluator iterative (#358) 2026-06-27 19:29:51 +02:00
API.swift perf(parse): build the TreeNode tree directly from the event stream (#295) 2026-06-25 14:15:57 +02:00
Lint.swift feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
PureXML.swift feat(html): lenient HTML parser and serializer 2026-06-08 07:12:42 +02:00
QuickFix.swift feat(editor): structured quick-fixes from completions 2026-06-08 13:35:33 +02:00