Skip to content

spawn(windows): release StaticPipeWriter start() ref when buffer-stdin write completes - #35297

Merged
Jarred-Sumner merged 1 commit into
mainfrom
farm/37c14955/static-pipe-writer-win-leak
Jul 24, 2026
Merged

Jarred-Sumner merged 1 commit into
mainfrom
farm/37c14955/static-pipe-writer-win-leak

spawn(windows): release StaticPipeWriter start() ref on every termina…

87ce158
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 23, 2026 in 17m 7s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/spawn/static_pipe_writer.rs:287-292 Test file, fixture, and LIVE_COUNT instrumentation dropped from the squashed commit

Annotations

Check failure on line 292 in src/spawn/static_pipe_writer.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Test file, fixture, and LIVE_COUNT instrumentation dropped from the squashed commit

The test file (`test/js/bun/spawn/spawn-buffer-stdin-leak.test.ts` + fixture), the `LIVE_COUNT` atomic in `StaticPipeWriter::create`/`Drop`, and the `subprocessInternals.staticPipeWriterLiveCount()` hook in `bun:internal-for-testing` — all described in the PR body's Verification section and iterated on through ddf245e1 — were dropped in the squash to 87ce1585; the diff now touches only three `.rs` files. REVIEW.md requires a leak regression test in the same PR ("UAF/leak fixes need an ASan repro