mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
A call into Node from an async fiber runs in a context of its own on Node's stack while the calling fiber stays suspended in it, but runtime code that Node called back there still ran as that fiber: scr_current named it, and a fiber resumed from there saved its resumer in scr_loop_ctx and, under ASan, its fake stack in the calling fiber's slot. The calling fiber's next park then returned to a context that no longer existed, or under ASan resumed with a fake stack the nested context had destroyed (6870-node-island-server-fibers in dev mode, sanitized: SEGV in nh_keep_done). The nested entry now runs host callbacks as the loop's code does (no current fiber, the main exception cell and ALS slot) and puts the calling fiber's state and the loop context back when it returns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>