Skip to content

Compilation panic with array of contref #13022

@alexcrichton

Description

@alexcrichton

This input:

(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 '<unnamed>' (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions