{{ message }}
Conversation
Several Emscripten EH-related JS variables were gated under `if !DISABLE_EXCEPTION_CATCHING`, making them unavailable at the link time if `-fexceptions` was not given. It may not be given due to a command argument mismatch, or because the code was not using EH but setjmp/longjmp. This PR makes `setTempRet0` and `ExceptionInfo` dependent on the method they were called in, rather than gating them behind `if !DISABLE_EXCEPTION_CATCHING`. This also exports `setThrew` when `SUPPORT_LONGJMP` is true too, because `setThrew` is called from invokes, which can be also generated from Emscripten setjmp/longjmp handling. (And also when the options mismatch between the compile time and link time, as in emscripten-core#27703) Fixes emscripten-core#27703.
Fedr
reviewed
Sep 15, 2026
There was a problem hiding this comment.
Stray ] here: when DISABLE_EXCEPTION_CATCHING is off this line already closes the array, so the unconditional ], below becomes a syntax error - that is the libexceptions.preprocessed.js:200 SyntaxError: Unexpected token ']' on the CI. Should end with '__cxa_can_catch',.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Several Emscripten EH-related JS variables were gated under
if !DISABLE_EXCEPTION_CATCHING, making them unavailable at the link time if-fexceptionswas not given. It may not be given due to a command argument mismatch, or because the code was not using EH but setjmp/longjmp.This PR makes
setTempRet0andExceptionInfodependent on the method they were called in, rather than gating them behindif !DISABLE_EXCEPTION_CATCHING.This also exports
setThrewwhenSUPPORT_LONGJMPis true too, becausesetThrewis called from invokes, which can be also generated from Emscripten setjmp/longjmp handling. (And also when the options mismatch between the compile time and link time, as in #27703)Fixes #27703.