Fix crash in Bun.file().writer() with invalid path/fd options - #30299
Closed
robobun wants to merge 1 commit into
Closed
Fix crash in Bun.file().writer() with invalid path/fd options#30299robobun wants to merge 1 commit into
Bun.file().writer() with invalid path/fd options#30299robobun wants to merge 1 commit into
Claude / Claude Code Review
completed
May 5, 2026 in 13m 15s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/runtime/webcore/Blob.zig:2978-2979 |
Pre-existing leak: allocated input_path overwritten without deinit |
Annotations
Check notice on line 2979 in src/runtime/webcore/Blob.zig
claude / Claude Code Review
Pre-existing leak: allocated input_path overwritten without deinit
Pre-existing minor leak (not introduced by this PR, but you're touching the exact line): when `fromJSWithTag` returns `.FileSink` with a heap-allocated `input_path` (i.e. the user passed `{ path: "…" }` and `toSlice` allocated for UTF-8 conversion), line 2979 overwrites `stream_start.FileSink.input_path` without calling `.deinit()` on the previous value, leaking the `ZigString.Slice`. Adding `stream_start.FileSink.input_path.deinit();` before the assignment would close it.
Loading