Commit 0887c5f
authored
Fix validation errors for struct.wait (#8394)
Prior to #8378, any `assert_invalid` assertions that required a feature
to be enabled spuriously succeeded even if the test would otherwise
wrongly pass validation. The checks that were in wasm-validator.cpp
didn't run if the ref was null or unreachable, which is wrong because
the type + field index immediates could still be wrong.
Move these assertions to IRBuilder where we have the type immediate
available.
Verified by removing the assert_invalid parts and checking that the
error message matches what's in the test.
Part of #8315.1 parent 88aa87b commit 0887c5f
3 files changed
Lines changed: 18 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2250 | 2250 | | |
2251 | 2251 | | |
2252 | 2252 | | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
2253 | 2263 | | |
2254 | 2264 | | |
2255 | 2265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3517 | 3517 | | |
3518 | 3518 | | |
3519 | 3519 | | |
3520 | | - | |
3521 | | - | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
3531 | | - | |
3532 | | - | |
3533 | | - | |
3534 | | - | |
3535 | | - | |
3536 | | - | |
3537 | | - | |
3538 | | - | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
3539 | 3526 | | |
3540 | 3527 | | |
3541 | 3528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments