Skip to content

test_dlfcn_asyncify doesn't work with MEMORY64 + JSPI #23585

Closed
@sbc100

Description

@sbc100
SyntaxError: Cannot convert [object Promise] to a BigInt
    at BigInt (<anonymous>)
    at __dlopen_js (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4405:12)
    at src.wasm._dlopen (wasm://wasm/src.wasm-000200ae:wasm-function[29]:0x90b)
    at src.wasm.dlopen (wasm://wasm/src.wasm-000200ae:wasm-function[28]:0x887)
    at src.wasm.main (wasm://wasm/src.wasm-000200ae:wasm-function[17]:0x53e)
    at ret.<computed> (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4788:24)
    at callMain (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4940:15)
    at doRun (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4983:24)
    at run (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4996:5)
    at removeRunDependency (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:422:7)
    at receiveInstance (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:571:5)
    at receiveInstantiationResult (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:581:12)
    at createWasm (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:604:19)

The problem is that we inject BigInt(ret) since _dlopen_js returns a pointer, but in the JSPI case it returns a promise which cannot be converted to BigInt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions