Skip to content

Atomics.wait: wake for a termination requested from another thread - #392

Open
dylan-conway wants to merge 1 commit into
mainfrom
dylan/atomics-wait-termination
Open

Atomics.wait: wake for a termination requested from another thread#392
dylan-conway wants to merge 1 commit into
mainfrom
dylan/atomics-wait-termination

Atomics.wait: wake for a termination requested from another thread

083c6f8
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 7, 2026 in 18m 30s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important Source/JavaScriptCore/runtime/WaiterListManager.cpp:112 Wasm memory.atomic.wait caller not updated for new Terminated semantics

Annotations

Check failure on line 112 in Source/JavaScriptCore/runtime/WaiterListManager.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Wasm memory.atomic.wait caller not updated for new Terminated semantics

This widens `WaitSyncResult::Terminated` to cover the "only a `NeedTermination` trap bit is set" state, but the second caller of `waitSync()` — Wasm's `waitImpl()` in `WasmOperationsInlines.h:750` — was not updated and still calls `vm.throwTerminationException()` directly, which `ASSERT(hasTerminationRequest())`s. Terminating a worker blocked in `memory.atomic.wait32/64` will now hit that debug assertion (and in release, throw with `m_hasTerminationRequest` unset and the trap bit still pending).