WebAssembly / WebAssembly/wabt
Missing Validation for catch_all Instruction
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
wasm-interp does not enforce the requirement that a catch block must be associated with a try block.
Test case
program.wasm
Environment
- OS: Ubuntu 20.04
- CPU: amd64
- WABT version: 1.0.36
- Commands:
./wasm-interp --enable-all --run-export=main ./program.wasm
Actual behavior
No validation error is produced.
Expected Behavior
According to the WebAssembly exception handling proposal, a catch block must be directly associated with a try block. If not, the module should fail validation with an error similar to:
catch block isn't associated to a try
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
Start at the wasm-interp entry point and reproduce the issue with program.wasm.txt using the reported --enable-all and --run-export=main command. Trace validation for catch instructions and ensure the supplied module is rejected with an error indicating that the catch block is not associated with a try block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100