-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run simple cpp file #327
Comments
328: fix master; add some emscripten calls r=MarkMcCaskey a=MarkMcCaskey notified by #327 ; that program when compiled now outputs `"RuntimeError: WebAssembly trap occured during runtime: memory out-of-bounds access"` ; which may have been broken by #326 Co-authored-by: Mark McCaskey <mark@wasmer.io>
Thanks for reporting this! So there are two reasons this could have happened:
After those were fixed, I'm still having an issue running this program; I'm getting a |
Yes, to add on top of what @MarkMcCaskey commented. When running with released version ➜ wasmer run cpp.wasm
"Can\'t instantiate module: LinkError([ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiid\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiid\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiij\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viijii\" }, ImportNotFound { namespace: \"env\", name: \"___cxa_uncaught_exception\" }, ImportNotFound { namespace: \"env\", name: \"_strftime_l\" }])" And when run with current ➜ wasmer run cpp.wasm
"Can\'t instantiate module: LinkError([ImportNotFound { namespace: \"env\", name: \"abortStackOverflow\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_ii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiid\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiid\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_iiiiij\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_v\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_vi\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_vii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viiiiii\" }, ImportNotFound { namespace: \"env\", name: \"nullFunc_viijii\" }, ImportNotFound { namespace: \"env\", name: \"___cxa_uncaught_exception\" }, ImportNotFound { namespace: \"env\", name: \"___lock\" }, ImportNotFound { namespace: \"env\", name: \"___map_file\" }, ImportNotFound { namespace: \"env\", name: \"___setErrNo\" }, ImportNotFound { namespace: \"env\", name: \"___syscall140\" }, ImportNotFound { namespace: \"env\", name: \"___syscall145\" }, ImportNotFound { namespace: \"env\", name: \"___syscall146\" }, ImportNotFound { namespace: \"env\", name: \"___syscall54\" }, ImportNotFound { namespace: \"env\", name: \"___syscall6\" }, ImportNotFound { namespace: \"env\", name: \"___syscall91\" }, ImportNotFound { namespace: \"env\", name: \"___unlock\" }, ImportNotFound { namespace: \"env\", name: \"_abort\" }, ImportNotFound { namespace: \"env\", name: \"_emscripten_get_heap_size\" }, ImportNotFound { namespace: \"env\", name: \"_emscripten_memcpy_big\" }, ImportNotFound { namespace: \"env\", name: \"_emscripten_resize_heap\" }, ImportNotFound { namespace: \"env\", name: \"_getenv\" }, ImportNotFound { namespace: \"env\", name: \"_llvm_stackrestore\" }, ImportNotFound { namespace: \"env\", name: \"_llvm_stacksave\" }, ImportNotFound { namespace: \"env\", name: \"_pthread_cond_wait\" }, ImportNotFound { namespace: \"env\", name: \"_strftime_l\" }, ImportNotFound { namespace: \"env\", name: \"abortOnCannotGrowMemory\" }, ImportNotFound { namespace: \"env\", name: \"memory\" }, ImportNotFound { namespace: \"env\", name: \"table\" }, ImportNotFound { namespace: \"env\", name: \"__memory_base\" }, ImportNotFound { namespace: \"env\", name: \"__table_base\" }, ImportNotFound { namespace: \"env\", name: \"tempDoublePtr\" }, ImportNotFound { namespace: \"env\", name: \"DYNAMICTOP_PTR\" }, ImportNotFound { namespace: \"global\", name: \"NaN\" }, ImportNotFound { namespace: \"global\", name: \"Infinity\" }])" We are working on investigating the issue and fixing it asap. |
We just found and are pushing a fix for C++! We're going to wrap it up with the other fixes and add it as a test. It should be merged on to master soon! |
328: fix master; add some emscripten calls r=xmclark a=MarkMcCaskey notified by #327 ; that program when compiled now outputs `"RuntimeError: WebAssembly trap occured during runtime: memory out-of-bounds access"` ; which may have been broken by #326 Co-authored-by: Mark McCaskey <mark@wasmer.io> Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
328: fix master; add some emscripten calls r=MarkMcCaskey a=MarkMcCaskey notified by #327 ; that program when compiled now outputs `"RuntimeError: WebAssembly trap occured during runtime: memory out-of-bounds access"` ; which may have been broken by #326 Co-authored-by: Mark McCaskey <mark@wasmer.io> Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
328: fix master; add some emscripten calls r=MarkMcCaskey a=MarkMcCaskey notified by #327 ; that program when compiled now outputs `"RuntimeError: WebAssembly trap occured during runtime: memory out-of-bounds access"` ; which may have been broken by #326 resolves #327 Co-authored-by: Mark McCaskey <mark@wasmer.io> Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
It seemed we were missing calling Here's the test file: https://github.com/wasmerio/wasmer/pull/328/files#diff-cbdacb4dc71f3c9fa01eb318ad62dda2R1 We will make a wasmer release soon. |
It still fails with
BTW, there is a typo in error message. It should be " occurred". |
Can you try with This is the file we have been able to run successfully, in case you want to try locally: https://github.com/wasmerio/wasmer/blob/master/lib/emscripten/emtests/hello.wasm (compiled from here) |
Confirmed. The issue has been fixed. BTW, I've tried to build with "Hello world" compiled with |
Thanks for following up @geloizi ; so I just ran the included |
@geloizi What OS are you running this on or if you could include the error output, that'd be very helpful! |
mac |
Hmm, I'm also running on a mac and am unable to reproduce with master and the |
never-mind. Emscripten |
Okay! Well please let me know if you have any other issues or ideas for Wasmer and I'll look in to them! I'm going to close this issue for now |
A simple cpp program:
Compiled with emscripten:
Execution fails:
The text was updated successfully, but these errors were encountered: