-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Exception handling helpers do not work with ASSERTIONS=1 #24086
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
Comments
The fact that The fact that |
sbc100
added a commit
to sbc100/emscripten
that referenced
this issue
Apr 10, 2025
…D_FUNCTIONS When reporting See emscripten-core#24086
sbc100
added a commit
to sbc100/emscripten
that referenced
this issue
Apr 14, 2025
…D_FUNCTIONS When reporting See emscripten-core#24086
sbc100
added a commit
to sbc100/emscripten
that referenced
this issue
Apr 14, 2025
…D_FUNCTIONS When reporting See emscripten-core#24086
sbc100
added a commit
to sbc100/emscripten
that referenced
this issue
Apr 14, 2025
…D_FUNCTIONS When reporting See emscripten-core#24086
sbc100
added a commit
to sbc100/emscripten
that referenced
this issue
Apr 15, 2025
…D_FUNCTIONS When reporting See emscripten-core#24086
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please include the following in your bug report:
Version of emscripten/emsdk:
Failing command line in full:
em++ ./main.cpp -o main.js -fwasm-exceptions -sEXPORT_EXCEPTION_HANDLING_HELPERS=1
(Any C++ source file will work.)
This outputs a
main.js
wheregetExceptionMessage
is inunexportedSymbols
due to the implicit-sASSERTIONS=1
. Importingmain.js
always causes an error sinceASSERTIONS
overrides the getter of anything inunexportedSymbols
to throw an error:emscripten/src/modules.mjs
Line 531 in c2d94c8
The test in
test_core.py
, however, explicitly disables ASSERTIONS:emscripten/test/test_core.py
Line 1380 in c2d94c8
I don't think disabling ASSERTIONS should be required to use exception helpers? If it needs to be, then you can probably dismiss this.
This stems from
emscripten/tools/link.py
Line 1839 in c2d94c8
EXPORTED_FUNCTIONS
instead ofEXPORTED_RUNTIME_METHODS
, and changing this lets me import the file.However, now
getExceptionMessage
withASSERTIONS
and Emscripten exceptions somehow triggers aWebAssembly.RuntimeError
formemory access out of bounds
. The__get_exception_message
insystem/lib/libcxxabi/src/cxa_exception_js_utils.cpp
used fromsrc/lib/libcore.js
apparently dies while returning. I have no idea when this error is emitted or howASSERTIONS
could impact that.Please let me know if I'm missing anything. Thanks for reading.
The text was updated successfully, but these errors were encountered: