Skip to content

Incorrect Index Validation for Recursive Function Types #2710

@Q1IQ

Description

@Q1IQ

Test case

typesection2.wasm.txt

Environment

  • OS: Ubuntu 20.04
  • CPU: amd64
  • wasm-interp version: 6ca912cf
  • Commands:
wabt/bin/wasm-interp --enable-all test.wasm --run-export=run

Actual behavior

The tool fails to compile the module, reporting a type variable range error during the function definition phase:

0000014: error: reference 0 is out of range (max: 0) in results
0000014: error: OnFuncType callback failed

Expected behavior

The module should be accepted and compiled successfully.

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