Skip to content

Remove use of deprecated emscripten setting: EXPORT_EXCEPTION_HANDLING_HELPERS#8507

Merged
sbc100 merged 1 commit intomainfrom
remove_EXPORT_EXCEPTION_HANDLING_HELPERS
Mar 21, 2026
Merged

Remove use of deprecated emscripten setting: EXPORT_EXCEPTION_HANDLING_HELPERS#8507
sbc100 merged 1 commit intomainfrom
remove_EXPORT_EXCEPTION_HANDLING_HELPERS

Conversation

@sbc100
Copy link
Member

@sbc100 sbc100 commented Mar 21, 2026

@sbc100 sbc100 requested a review from a team as a code owner March 21, 2026 18:13
@sbc100 sbc100 requested review from kripken and removed request for a team March 21, 2026 18:13
@sbc100 sbc100 changed the title Remove use of deprecated emscripten setting: `EXPORT_EXCEPTION_HANDLI… Remove use of deprecated emscripten setting: EXPORT_EXCEPTION_HANDLING_HELPERS Mar 21, 2026
@sbc100 sbc100 requested a review from aheejin March 21, 2026 18:13
@sbc100
Copy link
Member Author

sbc100 commented Mar 21, 2026

This is currently blocking the emscripten emsdk roller due to em++: error: EXPORT_EXCEPTION_HANDLING_HELPERS is deprecated (getExceptionMessage is automatically exported when ASSERTIONS or EXCEPTION_STACK_TRACES is 1 and throw is used). Please open a bug if you have a continuing need for this setting [-Wdeprecated] [-Werror] ninja: build stopped: subcommand failed.

Is this the correct fix?

The support code in binaryen seem to unconditionally depend on getExceptionMessage:

var [_, message] = getExceptionMessage(e);

@sbc100 sbc100 removed the request for review from kripken March 21, 2026 18:15
@sbc100
Copy link
Member Author

sbc100 commented Mar 21, 2026

Landing TBR to unblock the roller.

@sbc100 sbc100 merged commit 7116073 into main Mar 21, 2026
16 checks passed
@sbc100 sbc100 deleted the remove_EXPORT_EXCEPTION_HANDLING_HELPERS branch March 21, 2026 18:32
@aheejin
Copy link
Member

aheejin commented Mar 21, 2026

Yeah, unless it is compiling binaryen with -O0 or -sASSERTIONS, this looks like the right way.

aheejin added a commit to aheejin/emscripten that referenced this pull request Mar 21, 2026
…ation

Like WebAssembly/binaryen#8507, there can be
people who use this methods at `-O1` or above. This adds more
explanation of the workaround in ChangeeLog, site docs, and the
deprecation message. You don't strictly need
`decrementExceptionRefcount` to use `getExceptionMessage`, but you need
it if you care about asan, because exceptions thrown in Wasm and caught
in JS don't get freed unless you explicitly decrement the refcount.
aheejin added a commit to emscripten-core/emscripten that referenced this pull request Mar 21, 2026
…ation (#26517)

Like WebAssembly/binaryen#8507, there can be
people who use this methods at `-O1` or above. This adds more
explanation of the workaround in ChangeeLog, site docs, and the
deprecation message. You don't strictly need
`decrementExceptionRefcount` to use `getExceptionMessage`, but you need
it if you care about asan, because exceptions thrown in Wasm and caught
in JS don't get freed unless you explicitly decrement the refcount.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants