Commit Graph
3 Commits
Author SHA1 Message Date
Barzabel a854e680f7 test(expr): deep-nesting tests assert the guard's own error (#2124, #2125)
Reflect is not an expression global, so Reflect.construct never reached the
nesting check; the proxy case asserts Proxy is undefined.
2026-10-22 23:00:12 +03:00
Barzabel 8324d93c39 fix(expr): JSON.stringify key lists report cycles; document stack guard coverage (#2124, #2125)
An array replacer now copies each source object once per call, so a cycle stays a cycle and the native check throws TypeError, while shared objects still serialize. Documents which threads evaluate expressions, what the 256 KiB guard covers (tested on a 512 KiB thread), that it does not apply on wasm32, and why eval is indirect.
2026-10-22 21:33:16 +03:00
Barzabel 6686cc75ca fix(expr): bound runtime parser and native recursion depth (#2124, #2125)
eval, Function and the generator/async function constructors now check the nesting of their source like the expression text. join, toLocaleString, flat and JSON.stringify check the run's stack use per level, results nested past the detached levels become [object], and Proxy/Reflect are no longer available to expressions. Each of these overflowed the stack and aborted the app.
2026-10-22 20:28:38 +03:00