Skip to content

Assertion when assembling ref.cast with a no ref type #6655

@hgruniaux

Description

@hgruniaux

When using wasm-as on the following file:

(module
    (func (local $a anyref)
        (ref.cast i32 (local.get $a))))

An assertion fail in the code:

Assertion failed: isRef() (/src/src/wasm/wasm-type.cpp: getHeapType: 996)

I believe the assembler should print an error (the above wasm code is, of course, invalid) instead of crashing.

I tested the last version 117. I haven't tested the main branch, maybe the problem do not exist anymore.

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