Skip to content

Missing Subtyping Depth Validation #4501

@Q1IQ

Description

@Q1IQ

Subject of the issue

iwasm does not enforce the subtyping depth limit when compiling WebAssembly modules, which leads to successful execution of modules that should otherwise fail validation due to excessive subtyping depth. This behavior is inconsistent with other engines like V8 and WebKit, which enforce a subtyping depth limit of 64.

Test case

1.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

0x1:i32

Expected State

The module should fail validation due to the subtyping depth exceeding 64, aligning with the behavior observed in V8 and WebKit. An appropriate error message should indicate that the type depth exceeds the allowed limit, similar to:

subtype depth for Type section's 64th signature exceeded the limits of 63

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