node:vm: enforce timeout as a wall-clock deadline that interrupts Atomics.wait - #33764
Open
robobun wants to merge 4 commits into
Open
node:vm: enforce timeout as a wall-clock deadline that interrupts Atomics.wait#33764robobun wants to merge 4 commits into
robobun wants to merge 4 commits into
Claude / Claude Code Review
completed
Jul 8, 2026 in 43m 13s
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/vm/TimeoutWatchdog.cpp:35-39 |
Nudge loop only wakes syncWaiter; a nested clearTerminationState() can neuter an already-fired outer watchdog |
Annotations
Check warning on line 39 in src/jsc/bindings/vm/TimeoutWatchdog.cpp
claude / Claude Code Review
Nudge loop only wakes syncWaiter; a nested clearTerminationState() can neuter an already-fired outer watchdog
Nit: after `fire()`, this nudge loop only re-notifies the sync waiter — it never re-asserts `setHasTerminationRequest()` / `notifyNeedTermination()`. If a nested inner `node:vm` scope's own watchdog fires and its `clearTerminationState()` runs after this outer watchdog has already fired, the inner clear wipes the outer's `hasTerminationRequest` flag and `NeedTermination` trap; the outer script can then catch the inner's `ERR_SCRIPT_EXECUTION_TIMEOUT` and enter a CPU-bound loop that this notify (
Loading