Commit 6d533f1
Ralph Küpper
runtime: root async-from-sync iterator objects across GC safepoints
The %AsyncFromSyncIteratorPrototype% helpers created nursery objects (the
wrapper, the outer promise, reaction closures, the iter result, the captured
sync iterator) and held them as raw pointers across later allocations and JS
calls. Under the default-on moving young-gen scavenge those raw pointers are
invalidated (evacuated, or swept when unreachable), so a later use dereferenced
a stale/poison receiver.
Root every live young value in a RuntimeHandleScope and re-read it through the
handle after each allocation/JS call; use the long-lived string allocator for
the immortal property-name keys. Covers wrap_iterator, install_next/method,
next/return/throw, call/call_raw, continue, fulfilled/rejected_value, and
iter_result.
Claude-Session: https://claude.ai/code/session_01TwxRkALrR9HKSF1zKLSTAF1 parent 4cb7376 commit 6d533f1
1 file changed
Lines changed: 251 additions & 64 deletions
0 commit comments