-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: avoid crash using uv.errname()
binding
#44401
Conversation
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
d29f823
to
5a6c520
Compare
Fast-track has been requested by @juanarbol. Please 👍 to approve. |
Do we need to check |
Nope, that's why I removed that assertion and return |
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.
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.
I will close this; at this moment, it does not make any sense in the runtime, and #44421 made something better <3 |
PR-URL: nodejs#44421 Refs: nodejs#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>
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>
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>
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.