Overriding __cxa_throw to get stacktrace with WASM exceptions
12 views
Skip to first unread message
Sumit Kumar
unread,
Jan 18, 2023, 4:32:08 AM1/18/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
With javascript exceptions, we can override __cxa_throw in generated js file using say --pre-js or --post-js to get stacktrace of thrown exceptions which can be further used in diagnosis if that exceptions remains uncaught in production release builds. With wasm exceptions, overriding seems impossible as exceptions system libraries are linked statically and implementing our own __cxa_throw will cause duplicate symbols issue. Also refactoring our whole code base to have a common exception class is infeasible for us. Any other idea how do we get stacktrace of uncaught exceptions in release builds ?