Looks like this is wasm-specific issue. Proposed fix: https://github.com/emscripten-core/emscripten/pull/8309
On Tue, Mar 19, 2019 at 9:01 AM Phil Moc <[email protected]> wrote: > > Using the latest incoming on Mac: > > `MAC-PMoccio:tests pmoccio$ emcc -v > emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.38.29 > clang version 6.0.1 (https://github.com/kripken/emscripten-fastcomp-clang.git > 0479dcd35c96e2c5d1485dc8719e9c840a95b057) > (https://github.com/kripken/emscripten-fastcomp.git > af16ece2f07be6b83674cc3729249f8aca720fc2) (emscripten 1.38.29 : 1.38.29) > Target: x86_64-apple-darwin18.2.0 > Thread model: posix > InstalledDir: /Users/pmoccio/git/emsdk/clang/fastcomp/build_incoming_64/bin > shared:INFO: (Emscripten: Running sanity checks)` > > If I try to build one of the sample tests using the -s SAFE_HEAP=1 and -s > SAFE_HEAP_LOG=1 flags like so: > `emcc hello_malloc.cpp -s SAFE_HEAP=1 -s SAFE_HEAP_LOG=1 -s ASSERTIONS=2 -O0 > -o test.html` > > I get the following error in the web console when trying to load the page > (both on Chrome and Safari): > 'LinkError: WebAssembly Instantiation: Import #19 module="env" > function="segfault" error: function import requires a callable' > > Building with only the -s SAFE_HEAP=1 flag seems to cause no problems and I > can build and run the provided hello_malloc.cpp example with no error. Only > adding -s SAFE_HEAP_LOG=1 along with -s SAFE_HEAP=1 seems to result in this > error. Is there some requirement for using SAFE_HEAP_LOG that I'm missing? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
