Skip to content

ffi: avoid copying the threadsafe callback wrapper on the calling thread - #31332

Merged
Jarred-Sumner merged 3 commits into
mainfrom
claude/hardening-fix-r4-68-thread-safe-ffi-callback-copies-gc
May 26, 2026
Merged

ffi: avoid copying the threadsafe callback wrapper on the calling thread#31332
Jarred-Sumner merged 3 commits into
mainfrom
claude/hardening-fix-r4-68-thread-safe-ffi-callback-copies-gc

ffi: refcount the threadsafe callback wrapper instead of copying it p…

ae773d4
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 24, 2026 in 17m 11s

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/bun/ffi/cc.test.ts:383-386 stderr is captured but never asserted in close-while-enqueued test

Annotations

Check warning on line 386 in test/js/bun/ffi/cc.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

stderr is captured but never asserted in close-while-enqueued test

nit: `stderr` is captured here but never asserted. Per the test/CLAUDE.md convention, add `expect(stderr).toBe("")` before the exit-code check so that if the subprocess crashes the diagnostic output is surfaced in the failure message instead of just "expected 'ok\n', received ''". (Or drop the unused destructure and the `stderr: "pipe"` option.)