diff options
author | Alon Zakai <azakai@google.com> | 2023-04-12 16:28:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 16:28:56 -0700 |
commit | 42fc582162899aed64f2e1fa6a7a544fcba27a6d (patch) | |
tree | a327dddf1021b770db36504797acc447994a4796 /test/lit/binary/annotated-array-len.test | |
parent | 3a28c022e1607b012ecc6817aefcd14aa7470cce (diff) | |
download | binaryen-42fc582162899aed64f2e1fa6a7a544fcba27a6d.tar.gz binaryen-42fc582162899aed64f2e1fa6a7a544fcba27a6d.tar.bz2 binaryen-42fc582162899aed64f2e1fa6a7a544fcba27a6d.zip |
[Wasm GC] Casts of a non-nullable bottom type to non-null fail (#5645)
Casting (ref nofunc) to (ref func) seems like it can succeed based on the rule
of "if it's a subtype, it can cast ok." But the fuzzer found a corner case where that
leads to a validation error (see testcase).
Refactor the cast evaluation logic to handle uninhabitable refs directly, and
return Unreachable for them (since the cast cannot even be reached).
Also reorder the rule checks there to always check for a non-nullable cast
of a bottom type (which always fails).
Diffstat (limited to 'test/lit/binary/annotated-array-len.test')
0 files changed, 0 insertions, 0 deletions