diff options
author | Alon Zakai <azakai@google.com> | 2023-03-17 14:11:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-17 14:11:52 -0700 |
commit | 8f57b66171f6166f35f8549ea5cf7c047a2a7a28 (patch) | |
tree | 433a5c18df7b4a64872899c6d6afa0e1f8c9be1f /test/lit/binary/bad-delegate.test | |
parent | 69ff3bf4f10d1f50343a3db7e4730b576f679c70 (diff) | |
download | binaryen-8f57b66171f6166f35f8549ea5cf7c047a2a7a28.tar.gz binaryen-8f57b66171f6166f35f8549ea5cf7c047a2a7a28.tar.bz2 binaryen-8f57b66171f6166f35f8549ea5cf7c047a2a7a28.zip |
[Exceptions] Fix error on bad delegate index (#5587)
Fixes #5584
Diffstat (limited to 'test/lit/binary/bad-delegate.test')
-rw-r--r-- | test/lit/binary/bad-delegate.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lit/binary/bad-delegate.test b/test/lit/binary/bad-delegate.test new file mode 100644 index 000000000..8e6a011a5 --- /dev/null +++ b/test/lit/binary/bad-delegate.test @@ -0,0 +1,17 @@ +;; Test that we error properly on a file with a bad delegate (a delegate of an +;; index that does not refer to a valid try-catch). + +;; Disassembled binary from wabt: +;; +;; (module +;; (type (;0;) (func)) +;; (func (;0;) (type 0) +;; block ;; label = @1 +;; try ;; label = @2 +;; nop +;; delegate 0 +;; end)) + +;; RUN: not wasm-opt -all %s.wasm 2>&1 | filecheck %s + +;; CHECK: exceptionTargetNames not empty - invalid delegate |