Skip to content

jsc: free owned FFI allocations when the post-call trap check returns Err - #34577

Open
robobun wants to merge 4 commits into
mainfrom
farm/5cf7e7f5/trap-window-ffi-leaks
Open

jsc: free owned FFI allocations when the post-call trap check returns Err#34577
robobun wants to merge 4 commits into
mainfrom
farm/5cf7e7f5/trap-window-ffi-leaks

jsc: free owned FFI allocations when the post-call trap check returns…

b8a6f19
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 18, 2026 in 16m 17s

Code review found 1 potential issue

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

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/node/worker_threads/worker_threads.test.ts:1787-1799 Leak regression test can pass vacuously — no positive completion marker

Annotations

Check warning on line 1799 in test/js/node/worker_threads/worker_threads.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Leak regression test can pass vacuously — no positive completion marker

This test can pass vacuously: it asserts only that stdout is empty and that no stderr line matches the six FFI symbol names, but never checks `proc.signalCode` or a positive completion marker — so if the worker fixture is later renamed (every Worker fires `error` → stderr gets "Cannot find module", stdout stays `""`) or the process crashes before LSan runs, `hits` stays `[]` and the test still passes. Consider having the parent fixture `console.log("done")` once all `THREADS` chains finish, then