diff options
author | Alon Zakai <azakai@google.com> | 2024-02-20 15:21:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 15:21:31 -0800 |
commit | 403153868b936250c52d150ef158419a1d67bf55 (patch) | |
tree | 2aa51ae5b1710a53d2a619768ce02c068a2336a5 /test/lit/validation | |
parent | 40a4bd03538cb2a856b47f7ad5ce9cfc22c3a711 (diff) | |
download | binaryen-403153868b936250c52d150ef158419a1d67bf55.tar.gz binaryen-403153868b936250c52d150ef158419a1d67bf55.tar.bz2 binaryen-403153868b936250c52d150ef158419a1d67bf55.zip |
Validate function imports (#6315)
We validate functions in parallel, but function-parallel passes do not run on imports,
so we did not issue a validation error on an import using a disallowed type, for example.
All the changes in visitFunction are just to group all the parts using body to the
end, and putting them behind a check for body.
Diffstat (limited to 'test/lit/validation')
-rw-r--r-- | test/lit/validation/imports.wast | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lit/validation/imports.wast b/test/lit/validation/imports.wast new file mode 100644 index 000000000..57fa39ce2 --- /dev/null +++ b/test/lit/validation/imports.wast @@ -0,0 +1,9 @@ +;; Test that we validate imported functions. + +;; RUN: not wasm-opt %s -all --disable-simd 2>&1 | filecheck %s + +;; CHECK: all used types should be allowed + +(module + (import "env" "imported-v128" (func $imported-v128 (result v128))) +) |