Skip to content

stream: skip detached check for shared onread buffers - #67734

Closed
Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:stream-onread-sab-detached
Closed

Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:stream-onread-sab-detached

Conversation

@Ethan-Arrowood

Copy link
Copy Markdown
Contributor

PR #67542 introduced a small edge case regression for SharedArrayBuffers. The detached getter throws on a SAB, causing process crashes with an uncaught TypeError after the first read. Since onread.buffer is typed as including Uint8Array, we need to consider SAB-backed ones too.

AI-assisted (Claude Opus 5.5, my setup). The words are my own, per the Human Voice policy.

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 23, 2026
PR nodejs#67542 introduced a small edge case regression for
SharedArrayBuffers. The detached getter throws on a SAB, causing process
crashes with an uncaught TypeError after the first read. Since
onread.buffer is typed as including Uint8Array, we need to consider
SAB-backed ones too.

Refs: nodejs#67542
Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (1a8cf16) to head (efd34e2).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67734   +/-   ##
=======================================
  Coverage   90.53%   90.53%           
=======================================
  Files         803      803           
  Lines      285033   285038    +5     
  Branches    55006    55004    -2     
=======================================
+ Hits       258049   258054    +5     
- Misses      17153    17154    +1     
+ Partials     9831     9830    -1     
Files with missing lines Coverage Δ
lib/internal/stream_base_commons.js 96.09% <100.00%> (+0.06%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Ethan-Arrowood

Copy link
Copy Markdown
Contributor Author

Superseded by #67710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants