Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Validation for catch_all Instruction #2525

Open
Q1IQ opened this issue Jan 8, 2025 · 1 comment
Open

Missing Validation for catch_all Instruction #2525

Q1IQ opened this issue Jan 8, 2025 · 1 comment

Comments

@Q1IQ
Copy link

Q1IQ commented Jan 8, 2025

wasm-interp does not enforce the requirement that a catch block must be associated with a try block.

Test case

program.wasm

program.wasm.txt

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
@SoniEx2
Copy link
Contributor

SoniEx2 commented Jan 8, 2025

EHv3 is deprecated and will be removed some time in the future, the interpreter supports EHv4 these days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants