Skip to content

emscripten failure to run with ASYNCIFY=2 #113882

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

Open
benjamin-sieffert opened this issue Jul 20, 2023 · 1 comment
Open

emscripten failure to run with ASYNCIFY=2 #113882

benjamin-sieffert opened this issue Jul 20, 2023 · 1 comment
Labels
C-bug Category: This is a bug. O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! O-wasm Target: WASM (WebAssembly), http://webassembly.org/ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@benjamin-sieffert
Copy link

benjamin-sieffert commented Jul 20, 2023

Due to the issues described in #113852 , I wanted to try the new ASYNCIFY=2 option of emscripten.
https://github.com/benjamin-sieffert/emscripten-sleep-bug/tree/bi
The branch compiles OK but produces the following error in the browser:

Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at sigToWasmTypes (sdl_emscripten_template.js:1:67512)
    at sdl_emscripten_template.js:1:68357
    at Object.instrumentWasmImports (sdl_emscripten_template.js:1:68498)
    at sdl_emscripten_template.js:1:71488

Tested against emscripten-releases@00c70008e4b87ac4eba15bf2ab3ef2a1d44fa334 with both rustc 1.73.0-nightly (39f42ad9e 2023-07-19) + build-std and rustc 1.71.0 (8ede3aae2 2023-07-12) yielding the same outcome.

When using the emcc directly to compile and bundle C code with ASYNCIFY=2, it works fine.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 20, 2023
@Jules-Bertholet
Copy link
Contributor

@rustbot label O-wasm

@rustbot rustbot added the O-wasm Target: WASM (WebAssembly), http://webassembly.org/ label Jul 22, 2023
@Noratrieb Noratrieb added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 29, 2023
@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! O-wasm Target: WASM (WebAssembly), http://webassembly.org/ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants