-
Notifications
You must be signed in to change notification settings - Fork 30k
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
SIGSEGV in node::GetErrorSource #33578
Comments
@devsnek - what does |
@gireeshpunathil consistently 0x0000800000002c6d |
apparently it looks a bad address. To know what it represented in the code, we would need to trace back the code a little. Let me try to build one from the said commit. |
@devsnek I can’t reproduce with your code example and the commit you’re pointing to.
|
|
Hm okay, I’m unable to reproduce, unfortunately. |
Fwiw, comparing the binary you posted with the stack trace leads me to believe that the Line 131 in 54b36e4
|
Got around to making a debug build... Looks like you were right. Process 131488 launched: '/home/snek/Desktop/misc/nodejs/node/out/Debug/node' (x86_64)
Process 131488 stopped
* thread #1, name = 'node', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
frame #0: 0x00005555561a5737 node`node::GetErrorSource[abi:cxx11](isolate=0x000055555a840000, context=(val_ = 0x000055555a8c7310), message=(val_ = 0x000055555a8e9400), added_exception_line=0x00007fffffffb0bf) at node_errors.cc:131:9
128 underline_buf[off++] = (sourceline[i] == '\t') ? '\t' : ' ';
129 }
130 for (int i = start; i < end; i++) {
-> 131 if (sourceline[i] == '\0' || off >= kUnderlineBufsize) {
132 break;
133 }
134 CHECK_LT(off, kUnderlineBufsize); The issue is worse than that though... |
@devsnek I’m not sure why this is happening for you only, but it does seem like odd behavior coming from the V8 side that the start/source position are outside of the source line string here. We should probably bound-check |
Fixes: #33578 PR-URL: #33645 Reviewed-By: Rich Trott <[email protected]>
I'm planning to debug this at some point in the next week or so but if someone wants to get started sooner here's what I've got:
Using master as of 9949a2e.
Using linux64.
In the more complex code this was reduced from, the exception thrown by running
w.exports.whatever()
is from the actual wasmunreachable
instruction generated by thepanic!()
. In this reduced test case, the exception thrown is from node wasi, complaining aboutwasi.start(w)
not being called yet. In both cases, node::GetErrorSource is the point of failure.The text was updated successfully, but these errors were encountered: