Reproduction
Follow-up qualification for #988 found an existing Debug resource limitation:
the unmodified pinned test262 case
test/built-ins/RegExp/character-class-escape-non-whitespace.js exceeds this
machine's 3072 MB process-tree guard on both the exact dependency parent and the
capture-rollback candidate.
- Engine source baseline:
bcc32b717ee2765d2d1143ff0f697390eda642e7. - zig-regex: parent
1d3e5c9e3f2fb1c421de6433cab503220988617fversus601edb49ba0579f1a30e4318290a7d7fb919aeed. - Real zig-gc:
0285ef801dd221a4ae8e88b31a09ae31627657a3, not the local stub. - test262:
4249661388e5d3f92a85186213da140a6481490f, clean. - Zig
0.17.0-dev.1441+d5181a9c9, Debug, macOS M2 Pro / 16 GiB. - Each invocation used the existing shared machine lock and
HOME_RUN_MAX_MB=3072.
The stopped 25-case baseline batch reported indices 1636..1647 then exceeded the cap at 3469 MB. A fresh process containing ONLY case 1648 reproduced it:
| Build | Guard exit | Measured footprint at termination | Test result |
|---|---|---|---|
| Exact parent | 125 | 3461 MB | Incomplete; no outcome |
| Capture-rollback candidate | 125 | 3421 MB | Incomplete; no outcome |
Those sampled values are termination observations, not precise peaks or a before/after memory improvement claim. The guard samples periodically, so it can observe an overshoot before terminating the process tree.
Executed command from zig-js's repository root:
HOME_RUN_MAX_MB=3072 HOME_RUN_LOCK="$HOME/.cache/home-run.lock" \
perl ../home/scripts/run-bounded.pl 900 \
/path/to/preserved/test262 --worker test/built-ins/RegExp 1648 1Worker indices depend on filesystem traversal; do not assume 1648 elsewhere.
LLDB stopped the preserved baseline at test262.runOne before execution and
confirmed its abs_path was the file above. For another checkout, target that
exact file through the runner's file-subtree interface.
The upstream test performs its full 65,536-code-unit loop, replacing with
/\S+/g and checking whitespace behavior. Its inputs and assertions were not
reduced. All binaries, logs and receipts are retained under
/private/tmp/zig-js-sep23-verification.xkalXk on the measurement host:
regexp-native-1636-before.{json,log}, regexp-native-1648-before.{json,log},
regexp-isolated-1648-after.json, and memory-stop-1648.md.
Scope and unknowns
This is a resource-limited test, not an observed assertion failure, and not evidence of a regression introduced by #988. The allocation/retention cause is not yet identified; calling it a leak would be premature. No GC or regex workaround, weaker test, ReleaseFast substitution, or cap increase was applied.
Related: #473 (owned string/RegExp pipeline memory), #988 (qualification), #933 (machine resource boundary). Broader zig-utils/zig-regex#30 semantic work is separate from this resource limitation.
Done when
- Profile the unmodified standalone test, attributing the retained allocations.
- Fix the underlying lifetime/allocation issue without changing test semantics or weakening the user's guard.
- Demonstrate completion of the full case within the 3072 MB ceiling and run the relevant before/after correctness gates. Do not claim a full RegExp pass until all corpus cases actually complete.