GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dgram: fix abort on negative zero buffer size by JuHyeong424 · Pull Request #67662 · nodejs/node

Conversation

@JuHyeong424

@JuHyeong424 JuHyeong424 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

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

const s = require('dgram').createSocket('udp4');
s.bind(0, () => s.setRecvBufferSize(-0));

On v26.13.1:

# node::UDPWrap::BufferSize(...) at ../src/udp_wrap.cc:402
# Assertion failed: args[0]->IsUint32()

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added dgram Issues and PRs related to UDP and the dgram module. needs-ci PRs that need a full CI run. labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

  • the guide for first-time contributors
  • the contribution and automation policies
  • the pull request guide
  • the AI use policy
  • the Code of Conduct

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JuHyeong424
dgram: fix abort on negative zero buffer size
c49a653
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 <[email protected]>
@JuHyeong424
JuHyeong424 force-pushed the dgram-negative-zero branch from f7c620c to c49a653 Compare November 20, 2026 16:11
@MikeMcC399

This comment was marked as outdated.

Sign in to view
@JuHyeong424
JuHyeong424 marked this pull request as draft November 20, 2026 16:18
@JuHyeong424

This comment was marked as outdated.

Sign in to view
@JuHyeong424
JuHyeong424 marked this pull request as ready for review November 22, 2026 16:17
@codecov

codecov Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.73%. Comparing base (dcaf43a) to head (c49a653).
⚠️ Report is 130 commits behind head on main.

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     
Files with missing lines Coverage Δ
lib/dgram.js 97.19% <100.00%> (+<0.01%) ⬆️

... and 52 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Ethan-Arrowood
Ethan-Arrowood approved these changes Nov 23, 2026
View reviewed changes

@Ethan-Arrowood Ethan-Arrowood left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good work on these! Small but important fixes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Ethan-Arrowood Ethan-Arrowood added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 23, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79463/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JuHyeong424

JuHyeong424 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@Ethan-Arrowood Jenkins CI failed only on node-test-commit-windows-fanned; all other platforms passed.
I don't have access to the Jenkins logs, so I can't see which test failed.
The change is platform-independent (JS-only), so this looks unrelated/flaky.
Could you take a look or resume CI? Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79469/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MikeMcC399 MikeMcC399 added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 24, 2026
@Ethan-Arrowood

Ethan-Arrowood commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

CI is green now; let me tag @nodejs/net @nodejs/http for one more review so we can get this landed. Nice work again!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pimterry
pimterry approved these changes Nov 24, 2026
View reviewed changes

@pimterry pimterry left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pimterry pimterry added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 24, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 475bed3 into nodejs:main Nov 24, 2026
96 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Landed in 475bed3

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 24, 2026
aduh95 pushed a commit that referenced this pull request Nov 24, 2026
@JuHyeong424 @aduh95
dgram: fix abort on negative zero buffer size
dd2554d
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 <[email protected]>
PR-URL: #67662
Reviewed-By: Ethan Arrowood <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha) #67757
Merged
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@JuHyeong424 @gabylb
dgram: fix abort on negative zero buffer size
4c33def
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 <[email protected]>
PR-URL: nodejs#67662
Reviewed-By: Ethan Arrowood <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pimterry pimterry pimterry approved these changes
@Ethan-Arrowood Ethan-Arrowood Ethan-Arrowood approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. dgram Issues and PRs related to UDP and the dgram module. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@JuHyeong424 @nodejs-github-bot @MikeMcC399 @Ethan-Arrowood @pimterry
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.