Closed Michael-F-Bryan closed 3 years ago
It looks like the wasmer-runtime
crate was removed from wasmer
when they hit 1.0. I'll try migrating from wasmer-runtime v0.17
to wasmer v1.0
and see if that fixes the issue.
Dang this is a blocker for us. :|
@kthakore is the C++ runtime also having this issue?
It looks like the gesture rune triggers a memory out-of-bounds error inside
_call()
.When I ran it in GDB, I saw that
wasmer
caught a segfault in the middle of a bunch of WebAssembly code. The backtrace was entirely useless because we're in the middle of some JIT-compiled code that doesn't have debug info and we can't see any stack frames above where we enter the WebAssembly.This might be a bug in
wasmer
.Alternatively, I could have messed up the way we stash the pipeline in a global variable (the
static PIPELINE: Option<Box<dyn FnMut()>>
) so we try to interpret garbage memory as a function pointer.Steps to Reproduce
```console $ cd hotg-ai/rune && git checkout ae5b65778bd8913b14f418ab8ba398a10899c2e6 $ cargo rune build examples/gesture/Runefile Finished release [optimized] target(s) in 0.87s Running `target/release/rune build examples/gesture/Runefile` [2021-03-03T06:52:00.677Z DEBUG rune::build] Parsing "examples/gesture/Runefile" warning: Unknown type ┌─ examples/gesture/Runefile:11:20 │ 11 │ PROC_BLOCK