Skip to content
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

Since PR #21775, additional file packages error on load in modularize build when registered for preRun #22085

Closed
past-due opened this issue Jun 11, 2024 · 0 comments · Fixed by #22086

Comments

@past-due
Copy link
Contributor

past-due commented Jun 11, 2024

Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.58-git

Description:

Since PR #21775 (and Emscripten 3.1.58), the incoming Module is not modified in modularize builds.

Code that previously loaded additional file packages (by loading their .js) prior to instantiation of the compiled emscripten module - and worked in Emscripten < 3.1.58 - now fails. This path leads to the file package's runWithFS() being registered for preRun, but runWithFS() then apparently does not access the "actual" Module object which has FS_createPath (etc) added.

However, there appears to be a very simple fix:
callRuntimeCallbacks already passes the actual Module, so by using it in runWithFS(), the issue is resolved.

Proposed PR: #22086

EDIT:
@sbc100 While I just noticed that PR #21775 was reverted more recently, the above PR seems to fix the issue for this use-case, and it certainly seems to me like runWithFS() should be using the passed-in Module argument in any case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant