Debugging a WASM crash stack figuring out function names

27 views
Skip to first unread message

Brian Gavin

unread,
Apr 9, 2020, 11:19:58 AM4/9/20
to emscripten-discuss
Hello, I am sometimes getting a memory out of bounds exception thrown.

It reports like shown below in Chrome 
exception thrown:  RuntimeError: memory access out of bounds
at wasm-function[3928]:0x16cc09
at wasm-function[3936]:0x16ecc
at wasm-function[3936]:0x16cecc
...


If the crashed happen in a version compiled with profiling we would get function names.   Is it possible for me to some how figure out the function names for things like wasm-function[3928] ?  

Thanks
Brian Gavin

Alon Zakai

unread,
Apr 9, 2020, 12:54:25 PM4/9/20
to emscripte...@googlegroups.com
You can if you save a map of the function names and their indexes. See the --emit-symbol-map option.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/040c99b1-9621-4142-8bed-0a4883007793%40googlegroups.com.

Brian Gavin

unread,
Apr 9, 2020, 2:03:03 PM4/9/20
to emscripten-discuss
Thanks again Alon that is exactly what I needed.

Brian Gavin
Reply all
Reply to author
Forward
0 new messages