Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.37 (d02c29f95e9e68f2f50c2b0432c56a671814d5c8)
the real problem:
when instantiate the webassembly module in the webworker which is created by a pthread, the emcc generated js pass the import environment and the memory of the parent thread to the webworker, but did not pass the web assembly table to the web worker. so when the webworker invoke the function which is dynamic register by the addFunction, because of the parent did not pass the dynamic webassembly table to the webworker, so the webworker failed invoking by throwing a table index is out of bounds error. maybe the question is that webassembly can not be shared as webassembly memory. Would somebody like to give me some advice to handle this case?
the solution(i think)
i think it is maybe a solution that when the webworker failed to invoking the callback, the webworker can send a message to it's parent to invoking the callback function.
|