bytecodealliance / bytecodealliance/wasmtime
Cranelift: Huge stack slot results in panic rather than an error returned from codegen
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
### `.clif` Test Case
```
test compile
target x86_64
function u0:12() system_v {
ss0 = explicit_slot 1073741824
ss1 = explicit_slot 16
ss2 = explicit_slot 1073741824
ss3 = explicit_slot 16
ss4 = explicit_slot 48
block0:
v21 = stack_load.i8 ss3
trap user0
}
```
### Steps to Reproduce
* Compile above test.
### Expected Results
Returns an error from `compile_function`.
### Actual Results
Panics with `Offset in NominalSPOffset is greater than 2GB; should hit impl limit first: TryFromIntError(())`
### Versions and Environment
Cranelift version or commit: 0.104
Operating system: N/A
Architecture: x86_64
### Extra Info
Reported by @matthiaskrgr at https://github.com/rust-lang/rustc_codegen_cranelift/issues/1434
Contributor guide
Assessment
This issue has not been assessed yet.