Streams: one PipeReader loop with owned chunks, hold-not-adopt buffer pins, right-sized native pulls - #38886
Merged
Merged
Claude / Claude Code Review
completed
Aug 15, 2026 in 34m 29s
Code review found 3 important issues
Found 1 candidates, confirmed 6. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 3 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/bindings/bindings.cpp:3516-3533 |
collectBufferSpans not converted to pinStorage — fs.writev/readv still adopt bufferless OversizeTypedArrays |
Annotations
Check warning on line 3533 in src/jsc/bindings/bindings.cpp
claude / Claude Code Review
collectBufferSpans not converted to pinStorage — fs.writev/readv still adopt bufferless OversizeTypedArrays
`Bun__JSArray__collectBufferSpans` (bindings.cpp:7127-7136) still does `view->possiblySharedBuffer()` + `buf->pin()` — the pattern `pinStorage()` replaces — so async `fs.writev`/`fs.readv` (via `VectorArrayBuffer::from_js(.., pin: true)`, types.rs:1436) still adopt bufferless `OversizeTypedArray`s and take the full-GC pressure this PR eliminates elsewhere; the PR description's "every fs/zlib/crypto/Bun.write threadpool op" overstates coverage. Per REVIEW.md "Fix the whole class in the same PR —
Loading