Skip to content

Panic on modules containing an anyref local #905

@alexcrichton

Description

@alexcrichton

Given an input module such as:

(module (func (local anyref)))

this will fail with:

$ cargo run foo.wat
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/wasmtime ./foo.wat`
thread 'main' panicked at 'reference types were found but safepoints were not enabled.', /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/cranelift-codegen-0.56.0/src/regalloc/context.rs:219:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

@yurydelendik is this perhaps a bug in wasmparser where an anyref local is accepted, despite validation not having reference types enabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions