Repository navigation
dgram: fix abort on negative zero buffer size - #67662
Conversation
|
Review requested:
|
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
The size check accepts -0, but the binding asserts IsUint32(), which V8 reports as false for -0, so setRecvBufferSize(-0) and setSendBufferSize(-0) abort the process. Coerce the value to +0. Signed-off-by: JuHyeong424 <wkdwngud963@gmail.com>
f7c620c to
c49a653
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67662 +/- ##
==========================================
+ Coverage 90.61% 90.73% +0.12%
==========================================
Files 801 801
Lines 280966 281793 +827
Branches 54233 56141 +1908
==========================================
+ Hits 254592 255680 +1088
+ Misses 16566 16311 -255
+ Partials 9808 9802 -6
🚀 New features to boost your workflow:
|
Ethan-Arrowood
left a comment
There was a problem hiding this comment.
Good work on these! Small but important fixes
|
@Ethan-Arrowood Jenkins CI failed only on node-test-commit-windows-fanned; all other platforms passed. |
|
CI is green now; let me tag @nodejs/net @nodejs/http for one more review so we can get this landed. Nice work again! |
|
Landed in 475bed3 |
The size check accepts -0, but the binding asserts IsUint32(), which V8 reports as false for -0, so setRecvBufferSize(-0) and setSendBufferSize(-0) abort the process. Coerce the value to +0. Signed-off-by: JuHyeong424 <wkdwngud963@gmail.com> PR-URL: #67662 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Tim Perry <pimterry@gmail.com>
The size check accepts -0, but the binding asserts IsUint32(), which V8 reports as false for -0, so setRecvBufferSize(-0) and setSendBufferSize(-0) abort the process. Coerce the value to +0.
Reproduction
On v26.13.1:
setSendBufferSize(-0)aborts the same way. The abort cannot be caught with try/catch.Same class of fix as #65888 (fs), #67651 (os) and #67661 (tls).
Added
test/parallel/test-dgram-negative-zero.js.