While working #27, a heap-limit probe using string doubling crashed the process instead of surfacing a catchable or host OOM:
thread panic: strcell.makeCell OOM
src/strcell.zig:236:35 in makeCell
src/value.zig:2226:62 in Value.str
src/interpreter.zig:13867:32 in evalBinaryCurrent shape:
let s = "x";
for (;;) s = s + s;Under Context.Options.heap_limit_bytes, the string concatenation path eventually reaches strcell.makeCell, which catches allocator failure by panicking. That bypasses the interpreter's EvalError/error.Throw machinery and can abort a host process.
Acceptance:
- Dynamic string creation has a fallible path that returns
error.OutOfMemoryinstead of panicking. - Allocation-site OOM conversion from #27 can then make string allocation pressure catchable when a JS handler is active.
- Static/builtin string constants can keep using infallible helpers where that is genuinely safe during bootstrap.
- Add a focused heap-limit regression that exercises string allocation pressure without process abort.