wabt
wabt copied to clipboard
Missing Validation for catch_all Instruction
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
EHv3 is deprecated and will be removed some time in the future, the interpreter supports EHv4 these days.