Skip to content

node:vm: make breakOnSigint interrupt a script parked in Atomics.wait - #37268

Open
robobun wants to merge 9 commits into
mainfrom
farm/b6ff2cf8/sigint-atomics-wait
Open

node:vm: make breakOnSigint interrupt a script parked in Atomics.wait#37268
robobun wants to merge 9 commits into
mainfrom
farm/b6ff2cf8/sigint-atomics-wait

Attribute nested terminations to the frame that armed the watchdog

99d8eff
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 9, 2026 in 34m 45s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/jsc/bindings/NodeVMScript.cpp:323-324 Inner {timeout} run claims an outer {breakOnSigint} frame's SIGINT as its own timeout

Annotations

Check warning on line 324 in src/jsc/bindings/NodeVMScript.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Inner {timeout} run claims an outer {breakOnSigint} frame's SIGINT as its own timeout

The mirror case of the nesting fixed in 99d8eff is still open: an inner `{timeout}` run inside an outer `{breakOnSigint}` frame unconditionally claims a SIGINT (`!timeout` short-circuits the gate here and at NodeVMModule.cpp:81), so the inner reports a catchable `ERR_SCRIPT_EXECUTION_TIMEOUT` — mislabeled, no watchdog deadline passed — and a guest that swallows it defeats the outer's breakOnSigint for that Ctrl+C. This is pre-existing (pre-PR reached the same state via handleTraps) and a second