-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Wasm error stack traces are too similar to JS traces #9205
Comments
#7644 explains it and why it's not ideal. The idea is to RIIR. V8's CallSite API that deno's prepareStackTrace hook uses doesn't expose the relevant information so that's one more reason to expedite #7644. The C API doesn't expose everything either, however, and that's the current blocker. (That's partially on me - I submitted a CL to V8 last year that I promptly forgot about. I just checked and it looks like I never got notified of the review feedback.) |
@bnoordhuis Yes, I know that it's in the plans to move it over to the Rust, but V8 already provides the stack trace, and formats it, so why does Deno cover that up with another set of formatting? Also, do you have any suggestions regarding the issue raised? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@bnoordhuis Sorry to potentially annoy you, but are you aware of whether the JS or C APIs provide whether the source function was ECMAScript or WebAssembly source code? If so, which one(s)? |
@crimsoncodes0 In C there's With a reference to a |
@bnoordhuis Thank you for that information, when the stack trace is handled in Rust, I'll come back around to this, that is, if the core team is interested in my suggestion at all. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Example script:
loop
is a function that just recurses into itself, so we can get aRangeError
and a stack trace.Chrome gives this stack trace:
This tells me that the first function in my Wasm module threw the error, at byte
0x21
, and that it was called via the JS identifierloop
.Here's Deno's stack trace:
Personally, I'd say that this is very misleading, binary blobs don't exactly have columns and rows (
0:33
).I would consider that part to be a bug.
Otherwise, imo, it would be great to have the common
wasm-function[N]
that FF and Chromium show in the stack trace, for debugging.Also, I believe that double
<anonymous>
here is unnecessary:Deno:
Chromium:
what was the reasoning for overriding
Error.prepareStackTrace
in the first place?The text was updated successfully, but these errors were encountered: