zzjas opened issue #12317:
.clifTest Casetest compile target pulley64 function %trigger_bug(i32) -> i32 { sig0 = (i32) -> i32 winch fn0 = %callee(i32) -> i32 winch block0(v0: i32): ; try_call triggers the bug by invoking exception handling codegen ; Note: We omit exn0 because exception_payload_types is empty try_call fn0(v0), sig0, block1(ret0), [ default: block2 ] block1(v1: i32): return v1 block2: v3 = iconst.i32 -1 return v3 }Steps to Reproduce
RUST_BACKTRACE=1 cargo run -p cranelift-tools --bin clif-util -- compile --target pulley64 -p test.clifExpected Results
No assertion failure
Actual Results
thread 'main' (138509) panicked at cranelift/codegen/src/machinst/abi.rs:2041:13: assertion `left == right` failed left: 0 right: 2Versions and Environment
Cranelift version or commit: 67ce1ef23b8a5fb8ab293828cd719402b83d5b5b
Operating system: Ubuntu 22.04.5
Architecture: x86_64
Extra Info
Pulley
exception_payload_regsunconditionally returns 2 registers:Other ISAs (x64, aarch64, s390x, riscv64) match on call_conv and return
&[]for unsupported conventions like Winch. Whentry_callis compiled with Winch convention on Pulley,exception_payload_types(Winch)returns 0 elements whileexception_payload_regs()returns 2, triggering the assertion atabi.rs:2041.Thanks for looking into this and please let us know if we missed anything or if you have any feedback!
zzjas added the bug label to Issue #12317.
zzjas added the cranelift label to Issue #12317.
fitzgen commented on issue #12317:
Thanks for the report! Fix in https://github.com/bytecodealliance/wasmtime/pull/12325
fitzgen closed issue #12317:
.clifTest Casetest compile target pulley64 function %trigger_bug(i32) -> i32 { sig0 = (i32) -> i32 winch fn0 = %callee(i32) -> i32 winch block0(v0: i32): ; try_call triggers the bug by invoking exception handling codegen ; Note: We omit exn0 because exception_payload_types is empty try_call fn0(v0), sig0, block1(ret0), [ default: block2 ] block1(v1: i32): return v1 block2: v3 = iconst.i32 -1 return v3 }Steps to Reproduce
RUST_BACKTRACE=1 cargo run -p cranelift-tools --bin clif-util -- compile --target pulley64 -p test.clifExpected Results
No assertion failure
Actual Results
thread 'main' (138509) panicked at cranelift/codegen/src/machinst/abi.rs:2041:13: assertion `left == right` failed left: 0 right: 2Versions and Environment
Cranelift version or commit: 67ce1ef23b8a5fb8ab293828cd719402b83d5b5b
Operating system: Ubuntu 22.04.5
Architecture: x86_64
Extra Info
Pulley
exception_payload_regsunconditionally returns 2 registers:Other ISAs (x64, aarch64, s390x, riscv64) match on call_conv and return
&[]for unsupported conventions like Winch. Whentry_callis compiled with Winch convention on Pulley,exception_payload_types(Winch)returns 0 elements whileexception_payload_regs()returns 2, triggering the assertion atabi.rs:2041.Thanks for looking into this and please let us know if we missed anything or if you have any feedback!
Last updated: Jan 29 2026 at 13:25 UTC