Skip to content

node:http2: don't hold a thread-local borrow across the padded DATA write - #36917

Merged
Jarred-Sumner merged 7 commits into
mainfrom
farm/fce47b92/h2-padded-write-refcell
Aug 5, 2026
Merged

node:http2: don't hold a thread-local borrow across the padded DATA write#36917
Jarred-Sumner merged 7 commits into
mainfrom
farm/fce47b92/h2-padded-write-refcell

keep the padded-frame scratch shared: move it into the VM's RareData

18b1b6a
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 4, 2026 in 24m 41s

Code review found 2 potential issues

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

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/api/bun/h2_frame_parser.rs:6146-6148 Re-entrancy justification restated across three new comments

Annotations

Check warning on line 6148 in src/runtime/api/bun/h2_frame_parser.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Re-entrancy justification restated across three new comments

nit: the "the socket write can re-enter JS and reach this path again" invariant is restated in near-identical form here, on the `h2_padded_frame_buffer` field doc (rare_data.rs:271-273), and on `take_h2_padded_frame_buffer` (rare_data.rs:674-676) — three 3-line copies of the same why. State it once on `take_h2_padded_frame_buffer` (the accessor whose contract it is) and reduce the field doc and this body comment to a one-line pointer; that clears the comment-cop hits at 273/676/6148 in one go. T