You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS_FreeRuntime assertion fails after OOM with persistent objects #257
Calling ctx.dispose() after an OOM exception crashes the process with a WASM abort when the VM has any persistent heap objects (arrays, plain objects, etc.).
This regression was introduced in 0.32.0. The same code works correctly in 0.31.0.
Minimal Reproduction
import{getQuickJS}from"quickjs-emscripten";constctx=(awaitgetQuickJS()).newContext();ctx.runtime.setMemoryLimit(200*1024);// Any persistent VM object triggers the issuectx.evalCode(`var arr = [];`);// Trigger OOMtry{ctx.evalCode(`for (let i = 0; i < 1e6; i++) { arr.push("x".repeat(100)); }`);}catch(e){}ctx.runtime.setMemoryLimit(-1);// Removing the limit does not helpctx.dispose();// 💥 Aborted: Assertion failed: list_empty(&rt->gc_obj_list)
### ExpectedBehaviorctx.dispose()completescleanlyafteranOOMexceptioniscaught.
Activity
Update vendored QuickJS to 2025-09-13 (rebased) (justjake#243)
Update vendored QuickJS to 2025-09-13 (rebased) (justjake#243)