Commit aef8534
authored
Fix validation error in wasm-reduce (#8715)
When removing functions, wasm-reduce replaces calls to those functions
using `builder.replaceWithIdenticalType`. That method can modify the
input expression in-place to have a different types (e.g. replacing a
reference with a null), so when the previous code read `curr->type` to
set the type of the replacement block, it was possible to get a more
refined type, leading to validation failures. Fix the bug by explicitly
using the original type.
Fixes #8713.1 parent d3029d2 commit aef8534
2 files changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
| 1105 | + | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
| |||
1110 | 1111 | | |
1111 | 1112 | | |
1112 | 1113 | | |
1113 | | - | |
| 1114 | + | |
1114 | 1115 | | |
1115 | 1116 | | |
1116 | 1117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments