bytecodealliance / bytecodealliance/wasmtime
Cranelift: Panic on `aarch64` backend with large offset `stack_store`
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 135
Description
👋 Hey,
Fuzzgen found this when I tried to increase the max stack slot size.
### `.clif` Test Case
```
test compile
target aarch64
function u1:0() system_v {
ss0 = explicit_slot 5459
block0:
v25 = iconst.i32 0
stack_store v25, ss0+4095 ; v25 = 0
return
}
```
### Steps to Reproduce
* `clif-util compile --target aarch64 -D ./the-above.clif`
### Expected Results
The function to compile
### Actual Results
```
Running `/home/afonso/git/wasmtime/target/debug/clif-util compile --target aarch64 -D ./lmao.clif`
thread 'main' panicked at 'assertion failed: `(left != right)`
left: `p63i`,
right: `p63i`', cranelift/codegen/src/isa/aarch64/inst/emit.rs:767:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
### Versions and Environment
Cranelift version or commit: 4fc768df36e53d1c9f42db6b3ea52af45a3dc129 (current main)
Operating system: Linux
Architecture: AArch64
Contributor guide
Research direction
Start by running the provided `clif-util compile --target aarch64 -D` reproducer, then inspect the assertion at `cranelift/codegen/src/isa/aarch64/inst/emit.rs:767`. Done means the `.clif` test case compiles for the aarch64 target without panicking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100