wasmtime main.rs with explicit panic! signals 4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 03 Dec 2023 22:07:16 UTC
Hi
Just a note *perhaps* related to Firefox crashing with signal 4 [1]
This is really a **perhaps** because I have no clue, but an explicit
panic from rust in wasm32-wasi causes a signal 4 crash only on arm64 as
opposed to amd64.. FWIW:
main.rs
fn main() {
panic!();
}
rustc --target wasm32-wasi main.rs (on linux)
wasmtime [2] main.wasm gives on arm64
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a
backtrace
Illegal instruction (core dumped)
and on amd64
thread 'main' panicked at main.rs:2:1:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a
backtrace
Error: failed to run main module `main.wasm`
Caused by:
0: failed to invoke command default
1: error while executing at wasm backtrace:
0: 0x4a16 - <unknown>!__rust_start_panic
1: 0x485a - <unknown>!rust_panic
2: 0x478d -
<unknown>!std::panicking::rust_panic_with_hook::h639672e96e0f2421
3: 0x41c -
<unknown>!std::panicking::begin_panic::{{closure}}::heb5f2434a371507e
4: 0x37a -
<unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::hd6c4b8ac380c74ed
5: 0x5b8 -
<unknown>!std::panicking::begin_panic::h00c5404b50e70c31
6: 0xb48 - <unknown>!main::main::hd80a274883898d96
7: 0x451 -
<unknown>!core::ops::function::FnOnce::call_once::hc7ab48c327164eaa
8: 0x428 -
<unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::h00cde78d9b3ae99b
9: 0x509 -
<unknown>!std::rt::lang_start::{{closure}}::hecd871948b8b4e5c
10: 0x22ce -
<unknown>!std::rt::lang_start_internal::h409072ad2c29d9a2
11: 0x4b4 - <unknown>!std::rt::lang_start::hf51f2ca32a721dea
12: 0xb6c - <unknown>!__main_void
13: 0x2ba - <unknown>!_start
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment
variable may show more debugging information
2: wasm trap: wasm `unreachable` instruction executed
1
https://lists.freebsd.org/archives/freebsd-arm/2023-December/003323.html
2
https://github.com/bytecodealliance/wasmtime.git