alexcrichton opened issue #11545:
This currently fails on main:
$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Osignals-based-traps=n -Wexceptions=y ... Error: failed to run script file '/home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast' Caused by: 0: failed directive on /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast:49 1: error while executing at wasm backtrace: 0: 0x120 - <unknown>!<wasm function 7> 2: wasm trap: wasm `unreachable` instruction executedRemoving
-Osignals-based-traps=nyields a panic:$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Wexceptions=y ... thread 'main' panicked at /home/alex/code/wasmtime/crates/unwinder/src/exception_table.rs:168:25: Wasmtime exception unwind info only supports dynamic contexts on the stack note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
alexcrichton commented on issue #11545:
cc https://github.com/bytecodealliance/wasmtime/pull/11533 and @d-sonuga
alexcrichton added the fuzz-bug label to Issue #11545.
alexcrichton added the cranelift:area:regalloc label to Issue #11545.
d-sonuga commented on issue #11545:
I see that the issue happens because of the following scenario:
branch inst: def v0 (fixed: p0). succs: [block1(v0)]The single-pass relies on moving branch args (v0 in the case above) to expected spillslots of the successor blocks before branch instructions. That's not possible here because the vreg used as the branch arg is defined in the branch instruction.
Before I change that to account for this scenario, I need to know, can these vregs have any of the possible kinds of constraints?
I mean, is it possible for v0 in the above scenario to also be an any-reg constraint, or stack-only or no constraint?
cfallin commented on issue #11545:
Ah, yes, indeed, the
try_calldefines its return values and is also a terminator. The retvals' constraints will either be fixed-reg orany; the latter hppens when there are more return values than the ABI puts in registers. In practice we shouldn't seestackorreg, so if it's much more work to support those on terminators too, then no need at the moment.
cfallin closed issue #11545:
This currently fails on main:
$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Osignals-based-traps=n -Wexceptions=y ... Error: failed to run script file '/home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast' Caused by: 0: failed directive on /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast:49 1: error while executing at wasm backtrace: 0: 0x120 - <unknown>!<wasm function 7> 2: wasm trap: wasm `unreachable` instruction executedRemoving
-Osignals-based-traps=nyields a panic:$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Wexceptions=y ... thread 'main' panicked at /home/alex/code/wasmtime/crates/unwinder/src/exception_table.rs:168:25: Wasmtime exception unwind info only supports dynamic contexts on the stack note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
cfallin reopened issue #11545:
This currently fails on main:
$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Osignals-based-traps=n -Wexceptions=y ... Error: failed to run script file '/home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast' Caused by: 0: failed directive on /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast:49 1: error while executing at wasm backtrace: 0: 0x120 - <unknown>!<wasm function 7> 2: wasm trap: wasm `unreachable` instruction executedRemoving
-Osignals-based-traps=nyields a panic:$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Wexceptions=y ... thread 'main' panicked at /home/alex/code/wasmtime/crates/unwinder/src/exception_table.rs:168:25: Wasmtime exception unwind info only supports dynamic contexts on the stack note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
cfallin commented on issue #11545:
(I'll keep this issue open until we do a release in RA2 and pull the new version over, but thanks to Demilade for addressing the actual issue in the regalloc!)
abrown closed issue #11545:
This currently fails on main:
$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Osignals-based-traps=n -Wexceptions=y ... Error: failed to run script file '/home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast' Caused by: 0: failed directive on /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast:49 1: error while executing at wasm backtrace: 0: 0x120 - <unknown>!<wasm function 7> 2: wasm trap: wasm `unreachable` instruction executedRemoving
-Osignals-based-traps=nyields a panic:$ cargo run wast /home/alex/code/wasmtime/tests/spec_testsuite/proposals/wasm-3.0/throw.wast --target x86_64-unknown-linux-gnu -Oregalloc-algorithm=single-pass -Wexceptions=y ... thread 'main' panicked at /home/alex/code/wasmtime/crates/unwinder/src/exception_table.rs:168:25: Wasmtime exception unwind info only supports dynamic contexts on the stack note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Last updated: Dec 06 2025 at 07:03 UTC