-
Notifications
You must be signed in to change notification settings - Fork 3.4k
SIDE_MODULE with WASM seems to have no static initializer #6369
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
Comments
Possibly related: I discovered that #5844 broke things so that static initializers are missing when using wasm+pthreads, so it might be the case that it broke side modules too. I'm working on a fix for pthreads, I can look at side modules after I get that in. |
I can't reproduce this problem (using latest incoming - what version are you on? any local changes?), I see This would surprise me if it were broken, as we have tests for it. Does |
I built a side module with #6370 applied and verified that it at least does have a data section (that was the intent of that PR). |
Sorry for wasting time, folks. I think I had emscripten and binaryen out of sync (emscripten had been updated to a recent incoming and binaryen to an older master). Updating both and rebuilding seems to have resolved the issue. Closing. |
Thanks for helping me resolve #6365. Behind that, I found another issue using SIDE_MODULE with WASM.
It appears that SIDE_MODULEs don't have static initialization data, and I'm seeing zero'd data where I would expect static values to be. (This is somewhat related to my PR #6355, but that was without WASM -- as far as I can tell that code path is irrelevant when WASM is turned on).
The resulting
.wasm
files for theSIDE_MODULE
don't seem to contain any of the static strings I would expect. Is there maybe just some flag I need to set to output the initialization data?I have a minimal standalone here: https://github.com/mdboom/emscripten-side-module-no-static
The text was updated successfully, but these errors were encountered: