diff options
author | Thomas Lively <tlively@google.com> | 2023-08-30 16:17:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 14:17:34 -0700 |
commit | 2cdc61f04ef33c5f2055f54d88dee68110a42850 (patch) | |
tree | 3e603b973abb3526a9888eb417ffbf91d3330066 /test/lit/validation | |
parent | aceaa3582c8a4d6d6084e1087a79ae0bc488f8b7 (diff) | |
download | binaryen-2cdc61f04ef33c5f2055f54d88dee68110a42850.tar.gz binaryen-2cdc61f04ef33c5f2055f54d88dee68110a42850.tar.bz2 binaryen-2cdc61f04ef33c5f2055f54d88dee68110a42850.zip |
Validate and fix up tuples with non-nullable elements (#5909)
The code validating and fixing up non-nullable locals previously did not
correctly handle tuples that contained non-nullable elements, which could have
resulted in invalid modules going undetected. Update the code to handle tuples
and add tests.
Diffstat (limited to 'test/lit/validation')
-rw-r--r-- | test/lit/validation/bad-non-nullable-locals.wast | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lit/validation/bad-non-nullable-locals.wast b/test/lit/validation/bad-non-nullable-locals.wast index f22771591..9268e9b3a 100644 --- a/test/lit/validation/bad-non-nullable-locals.wast +++ b/test/lit/validation/bad-non-nullable-locals.wast @@ -59,3 +59,14 @@ (func $helper) ) +;; CHECK: non-nullable local's sets must dominate gets +(module + (func $tuple + ;; Since this tuple local has a non-nullable element, it is subject to the + ;; non-nullability rules. + (local $x (i32 (ref any) i64)) + (drop + (local.get $x) + ) + ) +) |