-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
FATAL ERROR v8::FromJust Maybe value is Nothing
#54186
Comments
v8::FromJust Maybe value is Nothing
I also tested it on Mac OS, using the same node version, and I got the same FATAL ERROR. |
I'm able to reproduce on latest /cc @nodejs/v8 |
Any reason to believe this is a V8 bug? It looks like |
This is due to node creating holey arrays in some places. Then the setter is called when the first element is set. In this case, it happens here: Lines 114 to 115 in 67f7137
That's easy to fix with an initialization like Lines 1306 to 1325 in 67f7137
|
I think using Object.defineProperty(Object.prototype, 'methods', {
set() {
throw new Error('boom')
}
});
const http = require('http'); |
We could use the alternative Array::New and Object::New variants that take arrays of keys and/or values and copies them directly to avoid it, but then this looks like another case of invalid modifications to prototypes that we don't explicitly support |
We don't support them, but we usually try to avoid hard crashes in these cases. |
I have a PR to get rid of the crashes #54276 but I am hesitant to write a regression tests for these, because monkey patching prototypes are generally considered unsupported, there are also many other bindings where we don't care about this...well, it's worth the code cleanup anyway. |
I don't think we should add tests. |
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: nodejs#54186
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
Assigning to a holey array in the native layer may crash if it has getters that throw. Refs: #54186 PR-URL: #54281 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
This no longer crashes since awhile ago (22.9.0/20.18.0 I think?), closing. |
Version
v22.5.1
Platform
Subsystem
No response
What steps will reproduce the bug?
Hi,
I want to report a node bug, by running the following code snippet, node.js gives a FATAL error.
AH
How often does it reproduce? Is there a required condition?
By just running the given code, node runtime gives node crash.
What is the expected behavior? Why is that the expected behavior?
Not a crash, by looking at the stack trace, it seems it is connected to
v8::FromJust Maybe value is Nothing
.What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: