menu

Wasmer

Wasmer is a organization dedicated to the advancement and development of WebAssembly through open-source software.

Channels
Team

wasmer fails on startup

February 1, 2019 at 9:57pm

wasmer fails on startup

February 1, 2019 at 9:57pm

env RUST_BACKTRACE=1 ~/dev/playground/wasmer/target/release/wasmer run fac.wasm 10

thread 'main' panicked at 'assertion failed: !desc.mutable', lib/clif-backend/src/module_env.rs:125:17

stack backtrace:

0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace

1: std::sys_common::backtrace::_print

2: std::panicking::default_hook::{{closure}}

3: std::panicking::default_hook

4: std::panicking::rust_panic_with_hook

5: std::panicking::begin_panic

6: <wasmer_clif_backend::module_env::ModuleEnv<'module, 'isa> as cranelift_wasm::environ::spec::ModuleEnvironment<'data>>::declare_global

7: cranelift_wasm::sections_translator::parse_global_section

8: cranelift_wasm::module_translator::translate_module

9: wasmer_clif_backend::module_env::ModuleEnv::translate

10: <wasmer_clif_backend::CraneliftCompiler as wasmer_runtime_core::backend::Compiler>::compile

11: wasmer_runtime_core::compile_with

12: wasmer_runtime::compile

13: wasmer::webassembly::compile

14: wasmer::main

15: std::rt::lang_start::{{closure}}

16: std::panicking::try::do_call

17: __rust_maybe_catch_panic

18: std::rt::lang_start_internal

19: main


February 1, 2019 at 10:01pm

Hi @capv, we had a PR that was fixing this thing (as part of emscripten). However, for unblocking you we just pushed a commit into master with the fix.

Let us know if now works for you :)

  • reply
  • like

thanks, it starts now

  • reply
  • like

there is a different problem though

"Can\'t instantiate module: LinkError([ImportNotFound { namespace: \"env\", name: \"abort\" }, ImportNotFound { namespace: \"env\", name: \"enlargeMemory\" }, ImportNotFound { namespace: \"env\", name: \"getTotalMemory\" }, ImportNotFound { namespace: \"env\", name: \"abortOnCannotGrowMemory\" }, ImportNotFound { namespace: \"env\", name: \"___setErrNo\" }, ImportNotFound { namespace: \"env\", name: \"___syscall140\" }, ImportNotFound { namespace: \"env\", name: \"___syscall146\" }, ImportNotFound { namespace: \"env\", name: \"___syscall54\" }, ImportNotFound { namespace: \"env\", name: \"___syscall6\" }, ImportNotFound { namespace: \"env\", name: \"_emscripten_memcpy_big\" }, ImportNotFound { namespace: \"env\", name: \"memory\" }, ImportNotFound { namespace: \"env\", name: \"table\" }, ImportNotFound { namespace: \"env\", name: \"__table_base\" }, ImportNotFound { namespace: \"env\", name: \"DYNAMICTOP_PTR\" }, ImportNotFound { namespace: \"env\", name: \"STACKTOP\" }, ImportNotFound { namespace: \"env\", name: \"STACK_MAX\" }])"
  • reply
  • like

February 4, 2019 at 6:52pm

It looks like that wasm module depends on emscripten. We're almost done with our updated emscripten implementation. Expect it to be out within a day or two.

  • reply
  • like

February 11, 2019 at 1:31am

We fixed this on master. We will publish a new wasmer-emscripten package to crates.io soon :)

  • reply
  • like

February 28, 2019 at 9:43pm

Hi! We just published wasmer-emscripen so you can use it in your package. Here's an example on how you would do it: https://crates.io/crates/wasmer-emscripten/

Hope this helps!

  • reply
  • like