mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-31 07:23:06 +08:00
Calls into Node now run on one dedicated 64 MB stack with a guard page, reached by a context switch, and the bridge sets V8's stack limit on it (bridge ABI 2). Before, a call from an async fiber (512 KB stacks without a guard page) failed to bootstrap Node, which the dev-mode LLVM differential showed. The runtime's stack guard follows the switch, and the switch carries ASan's fiber annotations. The Node island tests load Node from a libnode pack. Until the NI-13 packs are published, .github/actions/libnode-dev-pack assembles one for the Linux x64 test lanes (plain and sanitized): a pinned, checksum-verified prebuilt libnode of the repository's Node release (24.22.0) and Node's official headers (packages/libnode-common/dev-pack.json), with the bridge built against them by build-pack.mjs. The pack is cached by its inputs and the bridge source, so only a cache miss downloads and builds; the normal build path never does. tests/harness/libnode.ts makes a missing pack a failure in those lanes: island tests skip only off Linux x64 CI without a configured pack. The bridge smoke test (packages/libnode-common/test/bridge-smoke.c) loads the pack the way scr_node_island.c does and makes synchronous, throwing and asynchronous calls through the bridge with the runtime's bootstrap. IR, LLVM and object outputs of programs that call into Node no longer need a pack at build time; only executables record one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>