alexcrichton labeled issue #5456:
This input:
(module (func (local i32 f64 v128 v128 v128 v128 v128 v128 f64 f64 f64 v128 v128 v128) f32.const 0 i32.const 0 f64.const 0 f64.store align=1 i32.const 0 f64.const 0 f64.store align=4 i32.const 1 local.get 3 v128.load64_lane offset=1416707644 align=1 0 drop drop ) (memory (;0;) 0 2) )fails with
$ cargo run compile testcase0.shrunken.wat --static-memory-maximum-size 657468977 Finished dev [unoptimized + debuginfo] target(s) in 0.12s Running `target/debug/wasmtime compile testcase0.shrunken.wat --static-memory-maximum-size 657468977` thread '<unnamed>' panicked at 'you cannot add an instruction to a block already filled', cranelift/frontend/src/frontend.rs:533:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtracecc @fitzgen
alexcrichton opened issue #5456:
This input:
(module (func (local i32 f64 v128 v128 v128 v128 v128 v128 f64 f64 f64 v128 v128 v128) f32.const 0 i32.const 0 f64.const 0 f64.store align=1 i32.const 0 f64.const 0 f64.store align=4 i32.const 1 local.get 3 v128.load64_lane offset=1416707644 align=1 0 drop drop ) (memory (;0;) 0 2) )fails with
$ cargo run compile testcase0.shrunken.wat --static-memory-maximum-size 657468977 Finished dev [unoptimized + debuginfo] target(s) in 0.12s Running `target/debug/wasmtime compile testcase0.shrunken.wat --static-memory-maximum-size 657468977` thread '<unnamed>' panicked at 'you cannot add an instruction to a block already filled', cranelift/frontend/src/frontend.rs:533:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtracecc @fitzgen
elliottt commented on issue #5456:
Looks like the
trapemitted from the bounds checking code is emitted in the middle of a block:
https://github.com/bytecodealliance/wasmtime/blob/d9fdbfd50e653f93403405e4c4fd56cb77d034ae/cranelift/wasm/src/code_translator/bounds_checks.rs#L219-L221
elliottt edited a comment on issue #5456:
Looks like the
trapemitted from the bounds checking code is emitted in the middle of a block:
https://github.com/bytecodealliance/wasmtime/blob/d9fdbfd50e653f93403405e4c4fd56cb77d034ae/cranelift/wasm/src/code_translator/bounds_checks.rs#L219-L221
The block is terminated by thetrap, but there are additional instructions emitted after that.
elliottt edited a comment on issue #5456:
Looks like the
trapemitted from the bounds checking code is emitted in the middle of a block:
https://github.com/bytecodealliance/wasmtime/blob/d9fdbfd50e653f93403405e4c4fd56cb77d034ae/cranelift/wasm/src/code_translator/bounds_checks.rs#L219-L221
The block is terminated by thetrap, but there are additional instructions emitted after that. Should we stop translating if we've discovered that the load will unconditionally trap?
fitzgen closed issue #5456:
This input:
(module (func (local i32 f64 v128 v128 v128 v128 v128 v128 f64 f64 f64 v128 v128 v128) f32.const 0 i32.const 0 f64.const 0 f64.store align=1 i32.const 0 f64.const 0 f64.store align=4 i32.const 1 local.get 3 v128.load64_lane offset=1416707644 align=1 0 drop drop ) (memory (;0;) 0 2) )fails with
$ cargo run compile testcase0.shrunken.wat --static-memory-maximum-size 657468977 Finished dev [unoptimized + debuginfo] target(s) in 0.12s Running `target/debug/wasmtime compile testcase0.shrunken.wat --static-memory-maximum-size 657468977` thread '<unnamed>' panicked at 'you cannot add an instruction to a block already filled', cranelift/frontend/src/frontend.rs:533:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtracecc @fitzgen
Last updated: Dec 13 2025 at 19:03 UTC