WebAssembly / WebAssembly/wabt
Incorrect Type Index Validation for Implicit Function Signatures
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
Test case
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:
0000024: error: function type variable out of range: 2 (max 2)
0000024: error: OnFunction callback failed
Expected behavior
The module should be accepted and compiled successfully.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the attached typesection3.wasm.txt using the provided wasm-interp command. Trace validation of implicit function signatures and type-index bounds, then verify that the module is accepted and compiles successfully without the reported range error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100