FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: avoid crash using `uv.errname()` binding by juanarbol · Pull Request #44401 · nodejs/node · GitHub

/ node Public

src: avoid crash using uv.errname() binding - #44401

Closed
juanarbol wants to merge 1 commit into
nodejs:mainfrom
juanarbol:juan/fix-uv-crash
Closed

src: avoid crash using uv.errname() binding#44401
juanarbol wants to merge 1 commit into
nodejs:mainfrom
juanarbol:juan/fix-uv-crash

Conversation

Copy link
Copy Markdown
Member

Return undefined from uv binding when no args are provided and do the libuv
call with any arg (if provided) to the binding.

Fixes: #44400

This crash is being provoked by this assertion, using the binding directly is not guarantee that it will be invoked with the expected signature.

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. libuv Issues and PRs related to the libuv dependency or the uv binding. needs-ci PRs that need a full CI run. labels Aug 25, 2022
Return undefined from uv binding when no args are provided and do the
libuv call with any arg (if provided) to the binding.

Fixes: nodejs#44400
juanarbol added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 25, 2022

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @juanarbol. Please 👍 to approve.

Copy link
Copy Markdown
Contributor

Do we need to check err < 0 ?

Copy link
Copy Markdown
Member Author

Do we need to check err < 0 ?

Nope, that's why I removed that assertion and return undefined with no args

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The added test is failing on asan builds because of a memory leak from https://github.com/libuv/libuv/blob/fb76f210eb6f093bc06a2f07646e56851818ccf2/src/uv-common.c#L170.

juanarbol removed the fast-track PRs that do not need to wait for 48 hours to land. label Aug 26, 2022
theanarkh mentioned this pull request Aug 27, 2022
4 tasks
Comment thread src/uv.cc

Copy link
Copy Markdown
Member Author

I will close this; at this moment, it does not make any sense in the runtime, and #44421 made something better <3

juanarbol closed this Aug 29, 2022
nodejs-github-bot pushed a commit that referenced this pull request Aug 30, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 5, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 6, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 7, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
targos pushed a commit that referenced this pull request Sep 16, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 11, 2022
PR-URL: #44421
Refs: #44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
juanarbol deleted the juan/fix-uv-crash branch October 24, 2022 13:48
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
PR-URL: nodejs/node#44421
Refs: nodejs/node#44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
PR-URL: nodejs/node#44421
Refs: nodejs/node#44401
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. libuv Issues and PRs related to the libuv dependency or the uv binding. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node.js crashes using process.binding('uv').errname(positiveNumberOrNullValue)

5 participants


Back | FazBrowse Home | New Git URL