bytecodealliance / bytecodealliance/wasmtime
Compilation panic with array of contref
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
This input:
```wasm
(module
(type $ft (func))
(type $ct (cont $ft))
(type $arr (array (mut (ref null $ct))))
(func (export "boom")
(local $a (ref $arr))
(local.set $a (array.new_default $arr (i32.const 2)))
(array.copy $arr $arr
(local.get $a) (i32.const 0)
(local.get $a) (i32.const 0)
(i32.const 1))
)
)
```
fails with:
```
$ wasmtime compile testcase.wat -W stack-switching,function-references,gc
thread '' (402972) panicked at crates/cranelift/src/func_environ/gc/enabled.rs:1534:9:
assertion `left == right` failed
left: types::I128
right: types::I32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped) wasmtime compile testcase.wast -W stack-switching,function-references,gc
```
Contributor guide
Assessment
This issue has not been assessed yet.