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
An addition with overflow make lightbeam to panic when compiled in debug mode.
$ ./target/debug/debug_lightbeam add_overflow_mark_used_backend_min.wasm
thread 'main' panicked at 'attempt to add with overflow', XXX/wasmtime/crates/lightbeam/src/backend.rs:325:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
This issue is related to the function mark_used called by function pick.
Backtrace:
11: lightbeam::backend::Registers::mark_used
at XXX/wasmtime/crates/lightbeam/src/backend.rs:32512: lightbeam::backend::Context<M>::pick
at XXX/wasmtime/crates/lightbeam/src/backend.rs:536813: lightbeam::function_body::translate
at XXX/wasmtime/crates/lightbeam/src/function_body.rs:57714: lightbeam::function_body::translate_wasm
at XXX/wasmtime/crates/lightbeam/src/function_body.rs:82
pventuzelo
changed the title
[lightbeam] add overflow in debug mode (backend:pick)
[lightbeam] add overflow in debug mode (backend:pick:325)
Jan 17, 2020
Issue description
An addition with overflow make lightbeam to panic when compiled in debug mode.
This issue is related to the function
mark_used
called by functionpick
.Backtrace:
wasmtime/crates/lightbeam/src/backend.rs
Lines 322 to 326 in a582389
wasmtime/crates/lightbeam/src/backend.rs
Lines 5364 to 5371 in a582389
Reproduction
Download:
add_overflow_mark_used_backend_min.zip
or
wasm2wat add_overflow_mark_used_backend_min.wasm
:Testing program (need to be compiled in debug mode i.e.
RUSTFLAGS=-g cargo build
):wasmtime commit: a582389
Result when executed by wasmtime
Please note that
lightbeam
error should be the same than usingcranelift
backend i.e.unreachable
trap reached.The text was updated successfully, but these errors were encountered: