Disable assertions in tsgen - #25780
Closed
stephenduong1004 wants to merge 2 commits into
Closed
Conversation
When using tsgen with -sASYNCIFY=1 and assertions enabled, an assertion failure occurs: `Assertion failed: missing Wasm export: asyncify_start_unwind`. This is due to emscripten-core#25541. This change disables assertions when running tsgen to resolve the issue.
sbc100
reviewed
Nov 11, 2025
sbc100
reviewed
Nov 11, 2025
sbc100
left a comment
Collaborator
There was a problem hiding this comment.
@brendandahl do you know why this is needed?
Can you add a tsgen test that covers this case?
sbc100
reviewed
Nov 11, 2025
| settings.MEMORY64 = 2 | ||
| # Source maps haven't been generated yet and aren't needed to run embind_gen. | ||
| settings.LOAD_SOURCE_MAP = 0 | ||
| settings.ASSERTIONS = 0 |
Collaborator
There was a problem hiding this comment.
Maybe add a comment here as to why this is needed?
Collaborator
We run tsgen before the wasm-opt asyncify pass so the asyncify functions haven't been created yet. |
Member
|
Yeah, basically the wasm isn't fully generated yet... disabling assertions fixes asserts that expect those contents, but I wonder if we might hit other issues later. If so, for Asyncify at least, we'd need to run it before tsgen somehow... |
brendandahl
added a commit
that referenced
this pull request
Dec 3, 2025
When using `tsgen` with `-sASYNCIFY=1` and assertions enabled, an assertion failure occurs: `Assertion failed: missing Wasm export: asyncify_start_unwind`. This is due to #25541. This PR disables assertions for the `_asyncify_<x>` exports when running `tsgen` to resolve the issue. Continuation of #25780 --------- Co-authored-by: stephenduong1004 <stephenduong@google.com> Co-authored-by: Alon Zakai <alonzakai@gmail.com>
Collaborator
|
Fixed slightly differently in #25899 |
inolen
pushed a commit
to inolen/emscripten
that referenced
this pull request
Feb 13, 2026
…#25899) When using `tsgen` with `-sASYNCIFY=1` and assertions enabled, an assertion failure occurs: `Assertion failed: missing Wasm export: asyncify_start_unwind`. This is due to emscripten-core#25541. This PR disables assertions for the `_asyncify_<x>` exports when running `tsgen` to resolve the issue. Continuation of emscripten-core#25780 --------- Co-authored-by: stephenduong1004 <stephenduong@google.com> Co-authored-by: Alon Zakai <alonzakai@gmail.com>
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.
When using
tsgenwith-sASYNCIFY=1and assertions enabled, an assertion failure occurs:Assertion failed: missing Wasm export: asyncify_start_unwind. This is due to #25541.This PR disables assertions when running
tsgento resolve the issue.