You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasmtime with lightbeam backend panic due to an unreachable!. This issue will make program calling lightbeam as 3rd party library to crash. Instead an error should be through to let the caller handle it properly.
I'd like to reopen this issue, as it appears to be because ValueLocation::CondCode isn't covered. The correct fix is to support ValueLocation::CondCode, and furthermore to remove all _ => branches from matches in the backend.
Issue description
wasmtime
with lightbeam backend panic due to anunreachable!
. This issue will make program calling lightbeam as 3rd party library to crash. Instead an error should be through to let the caller handle it properly.Reproduction
wasmtime commit: 3558d41
Compilation with debug info:
Download & run testcase:
panic_internal_unreachable_code.zip
Related piece of code
lightbeam panics because of a calling to
unreachable!
macro.wasmtime/crates/lightbeam/src/backend.rs
Lines 3558 to 3560 in 3558d41
Fix proposal
After applying the pull request 672,
wasmtime
will return:$ ./target/release/wasmtime --lightbeam panic_internal_unreachable_code.wasm Error: failed to process main module `panic_internal_unreachable_code.wasm` Caused by: 0: WebAssembly failed to compile 1: Compilation error: Failed to translate function: Microwasm error: i32_extend_s unreachable code
The text was updated successfully, but these errors were encountered: