-
Notifications
You must be signed in to change notification settings - Fork 31.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
Node.js crashes using process.binding('uv').errname(positiveNumberOrNullValue)
#44400
Comments
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
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
it seems this method is not used in Node.js source code. |
It is not, but still reachable code in userland |
It's also been (doc) deprecated since v10.9.0. Userland should not be relying on it. If anything, I think we should start looking into making it a runtime deprecation now. |
Like removing the pending deprecation flag? |
@juanarbol Moving this outside of the conditional. |
This is an expected behavior |
Version
v16.16.0 (also main branch at this moment)
Platform
Linux pop-os 5.19.0-76051900-generic #202207312230
166078056622.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A x86_64 x86_64 x86_64 GNU/LinuxSubsystem
No response
What steps will reproduce the bug?
By running code like this:
process.binding('uv').errname(0)
process.binding('uv').errname(1)
process.binding('uv').errname()
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
It should not crash, it could return undefined or do the libuv call
What do you see instead?
Additional information
I will provide the fix for this one. :gree
The text was updated successfully, but these errors were encountered: