Skip to content

Conversation

@stephenduong1004
Copy link

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 when running tsgen to resolve the issue.

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 sbc100 requested a review from brendandahl November 11, 2025 23:15
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendandahl do you know why this is needed?

Can you add a tsgen test that covers this case?

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here as to why this is needed?

@brendandahl
Copy link
Collaborator

@brendandahl do you know why this is needed?

We run tsgen before the wasm-opt asyncify pass so the asyncify functions haven't been created yet.

@kripken
Copy link
Member

kripken commented Nov 11, 2025

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...

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.

4 participants