Commit 92ad959
authored
Fix a text parser assertion on bad immediates (WebAssembly#7252)
We previously asserted that the end of a nested expression is the same
when we parse it with a null context just to find its children and when
we parse it for real. It turns out that it is possible for the two end
positions to be different when the instruction is invalid in a way that
only the real parse catches. Return a normal error instead of asserting
because it is possible for invalid input to trigger this condition.
Fixes WebAssembly#7251.1 parent 9498d5e commit 92ad959
2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
1008 | 1015 | | |
1009 | 1016 | | |
1010 | 1017 | | |
| |||
| 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 | + | |
0 commit comments