AtlatestRepositorysigil-doc

sigil-doc / tree / test / transcripts / sd-p4reader-oom-rederivation.txt

1SD-P4 follow-up: re-derivation of the reader out-of-memory claim, 2026-08-10
2Binary: sigil 0.18.3 (sigil-lang 0.18.3-dev+0ed19fd1)
3All runs under 'ulimit -v 2000000' so a real OOM cannot reach the host.
4
5MINIMAL REPRO -- two bytes, plain .sgl, ordinary front end, no sigil-doc:
6 printf '(}' > /tmp/plain.sgl && ( ulimit -v 2000000; sigil eval -f /tmp/plain.sgl )
7 -> FATAL: Out of memory growing gray stack ; exit 134 ; ~47s to exhaust 2 GiB
8
9DISCRIMINATOR: a '}' inside an unclosed '(' or '['. A ']' there is handled cleanly.
11input result
12----- ------
13(} OOM (exit 134)
14("A"} OOM (exit 134)
15[} OOM (exit 134)
16(a} OOM (exit 134)
17[a} OOM (exit 134)
18(a (b} c) OOM (exit 134)
19(] CLEAN: mismatched brackets: '(' opened at line 1 closed with ']'
20( CLEAN (no error, reads to EOF)
21("A" CLEAN (no error, reads to EOF)
22} CLEAN: READ ok, ends at 0
23(a) } CLEAN: READ ok, ends at 3
25The original 77-byte .sgd manuscript (/tmp/oom-repro.sgd) also OOMs, but only
26because it contains '["T" "A"}' -- a '[' closed by '}'. The sigil-doc
27delegation and the '['->'(' substitution are NOT required.
29CORRECTION: my earlier description, "an unclosed '[' followed by any later ']'",
30was WRONG. That shape is precisely the one that behaves CLEANLY.