emscripten-core/emscripten

Module.instantiateWasm callback failed with error: ReferenceError: resetPrototype is not defined, when using pthreads+MODULARIZE+sanitizers

Open

#12.865 aberto em 23 de nov. de 2020

Ver no GitHub
 (4 comments) (1 reaction) (0 assignees)C++ (3.519 forks)batch import
help wantedwontfix

Métricas do repositório

Stars
 (27.361 stars)
Métricas de merge de PR
 (Mesclagem média 19d 10h) (147 fundiu PRs em 30d)

Description

When simple C++ source code is compiled with sanitize and pthreads flags, following error occurs at runtime.

Module.instantiateWasm callback failed with error: ReferenceError: resetPrototype is not defined emcc_pthread_and_sanitize_error

PFA test case WebAssembly.zip to reproduce the above issue. Issue is reproducible on Emscripten version 2.0.7. To compile the test.cc, following command is used. em++ -fsanitize=address -sINITIAL_MEMORY=536870912 -sUSE_PTHREADS=1 -sPTHREAD_POOL_SIZE=1 -sMODULARIZE=1 -sEXPORT_NAME="testWasmModuleReady" --bind --no-entry test.cc -o test.js

Note that, issue is not reproducible if sanitize flag is removed from the compilation.

Guia do colaborador