Commit fb7b2c5
authored
Use table's index type when parsing element segments (#8380)
Resolves the spec test error in call_indirect64.wast:
```
run_command `/usr/local/google/home/stevenfont/code/binaryen3/bin/wasm-shell /usr/local/google/home/stevenfont/code/binaryen3/test/spec/testsuite/call_indirect64.wast` failed (1) 0 BUILDING MODULE [line: 3]
[wasm-validator error in module] i32 != i64: element segment offset must match table index type, on
(i32.const 0)
failed validation
```
Previously we always assumed a 32-bit index even if the table is 64
bits. Use the index type of the table during parsing.
Part of #8261.1 parent 72cd1b3 commit fb7b2c5
2 files changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments