-
Notifications
You must be signed in to change notification settings - Fork 188
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
[NativeAOT-LLVM] Implement managed stack traces #2404
Labels
area-NativeAOT-LLVM
LLVM generation for Native AOT compilation (including Web Assembly)
Comments
jkotas
added
the
area-NativeAOT-LLVM
LLVM generation for Native AOT compilation (including Web Assembly)
label
Sep 16, 2023
Maybe relevant: WebAssembly/wasi-sdk#334 (comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a large work item so I am splitting it from #2169.
What we have today:
The mangled names have so far been an acceptable stop-gap solution, but we can and should do better. The ultimate goal is parity with the implementation on non-WASM targets.
Here's a rough outline of the strategy that would work for the browser targets:
R_WASM_FUNCTION_OFFSET
family of relocations. This is needed because LLVM does not support emitting them for the data section. Verify first that the linker is able to process them, however.ExceptionDispatchInfo
functionality to be complete.WASI is harder... We could push for a stack trace API to be added upstream (for the second time); I think I could create a prototype for Wasmtime, but it would be anyone's guess when and if that goes through.
We can utilize the virtual unwind stack to capture stack traces, by linking all frames and disabling some optimizations, and that would work for Debug builds, but not for Release ones due to the overhead. Of course, stack traces in Debug is better than the current state of "nothing", but it would be much, much better if we could utilize the same approach as for browsers.
The text was updated successfully, but these errors were encountered: