Objective
Make regex parser/AST construction fully rollback-safe under allocator failure so WAF runtime control compilation cannot leak or retain partially owned nodes.
Deliverables
- Fix parseConcat ownership when node-list growth fails.
- Fix concatenation-tree ownership across intermediate parent allocation failures.
- Add exhaustive allocation-failure coverage around representative regex compilation.
- Run the zig-regex test suite with Zig 0.17-dev through Pantry.
Acceptance criteria
- No leaks, double frees, or invalid ownership under std.testing.checkAllAllocationFailures.
- Existing syntax and matching tests remain green.
- Small conventional commit pushed directly to main as Chris without touching the preserved untracked zig-regex checkout entry.
Relationships
- Parent: REGEX-03 #16
- Discovered by: zig-waf WAF-15 #16
- Blocks bounded runtime regex target exclusions in zig-waf.