Skip to content

Missing Table Element Type Validation #4495

@Q1IQ

Description

@Q1IQ

iwasm does not enforce the requirement that the element type of a table must be a reference type. This behavior violates the WebAssembly specification, which mandates that a table’s element type must be a reference type. Using an i32 type for the table element should be rejected at validation time.

Test case

negative_2.wat.txt
negative_2.wasm.txt

Your environment

  • OS: Ubuntu 20.04
  • CPU: amd64
  • WAMR version: iwasm 2.2.0
  • Commands:
iwasm --interp -f main ./program.wasm

Actual behavior

(no error or warning)

Expected State

Table type should be a ref type, got I32 

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