-
Notifications
You must be signed in to change notification settings - Fork 1.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
[C API] Enabling debug info makes wasmtime_module_new() crash #6269
Comments
See #3999 |
I see, doesn't seem like I should hold my breath for a fix. So in a situation like the one described at the beginning of my post, how does one go about locating the source of the problem? |
The state-of-the-art is unfortunately "printf debugging" in cases like this. The situation described here is unfortunately still the case -- we don't have anyone who understands the existing DWARF-handling code deeply enough to attempt to fix it -- but we do at least have some discussions going in our "debugging SIG" that might eventually lead to something. The bottleneck as always is engineer time... |
I'm going to close this in favor of #3999 since it's the same issue as that one, but thanks for the report! |
I will mention though that as for your original issue you can try enabling debug information in whatever is compiled to wasm. That will generate a filename/line number in the trap backtrace which can be useful for debugging. |
Thanks, I realised that I had stripping enabled in my module compilation command. Anyway my problem was due to the module's stack size being way too small (2048 bytes), it's a shame the runtime didn't warn about this. |
I wrote a host to run functions from WASM reactors and with one WASM module after calling one of its functions I get the following trap message:
It's rather unhelpful so I wanted to add debug information, which I thought I'd do by adding
wasmtime_config_debug_info_set(config, true);
to my code. But now that I've done this when my program runswasmtime_module_new()
I get this:I have no idea why. I compiled the WASM module (from C using wasi-sdk) with
-Og -g3
, which I'm not sure is sufficient to get the debug info needed. Here's the host program's relevant code:The version of Wasmtime is the
dev
buildwasmtime-dev-x86_64-mingw-c-api.zip
from the Releases from 7 hours ago.Edit: I just checked with a .wasm module that works fine and when I enable debug info it also works fine, just not with a buggy WASM module. So it would probably help to include the fault module:
test.zip
The text was updated successfully, but these errors were encountered: