Skip to content

emscripten failure to run with ASYNCIFY=2 #113882

Open
@benjamin-sieffert

Description

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.

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions