Skip to content

fix(h2): TypeError: Cannot read properties of null (reading 'push') i…#4881

Open
hxinhan wants to merge 1 commit intonodejs:mainfrom
hxinhan:main
Open

fix(h2): TypeError: Cannot read properties of null (reading 'push') i…#4881
hxinhan wants to merge 1 commit intonodejs:mainfrom
hxinhan:main

Conversation

@hxinhan
Copy link
Contributor

@hxinhan hxinhan commented Mar 10, 2026

This relates to...

#4880

@hxinhan hxinhan force-pushed the main branch 2 times, most recently from 80a5e90 to 90a543c Compare March 10, 2026 20:32
@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.01%. Comparing base (07276c9) to head (eba9d9f).

Files with missing lines Patch % Lines
lib/dispatcher/client-h2.js 50.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4881   +/-   ##
=======================================
  Coverage   93.01%   93.01%           
=======================================
  Files         112      112           
  Lines       35287    35287           
=======================================
  Hits        32823    32823           
  Misses       2464     2464           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Can you solve the TOCTOU without adding the ? guard. That sit in a hot path, and it's likely that it will add some overhead.

@hxinhan
Copy link
Contributor Author

hxinhan commented Mar 11, 2026

Can you solve the TOCTOU without adding the ? guard. That sit in a hot path, and it's likely that it will add some overhead.

I'm not sure how to avoid a non-null check for res. I've removed that now.

Only with the change of moving stream.on('data', ...), the issue is still not reproducible in the regression test issue-4880.js

…n RequestHandler.onData under high H2 concurrency
Copy link
Member

@metcoder95 metcoder95 left a comment

Choose a reason for hiding this comment

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

lgtm

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants