summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-09-20 15:01:46 -0700
committerGitHub <noreply@github.com>2021-09-20 22:01:46 +0000
commit042e686e0b6f79ae532321f170a07c89a220b513 (patch)
treea1593d2ed46916aaac29184ec8b1f53fa7866289 /src/wasm/wasm-s-parser.cpp
parentfae5d8b78764556c93be5d8e2c2692596e554c4c (diff)
downloadbinaryen-042e686e0b6f79ae532321f170a07c89a220b513.tar.gz
binaryen-042e686e0b6f79ae532321f170a07c89a220b513.tar.bz2
binaryen-042e686e0b6f79ae532321f170a07c89a220b513.zip
[Wasm GC] Fix invalid intermediate IR in OptimizeInstructions (#4169)
We added an optional ReFinalize in OptimizeInstructions at some point, but that is not valid: The ReFinalize only updates types when all other works is done, but the pass works incrementally. The bug the fuzzer found is that a child is changed to be unreachable, and then the parent is optimized before finalize() is called on it, which led to an assertion being hit (as the child was unreachable but not the parent, which should also be). To fix this, do not change types in this pass. Emit an extra block with a declared type when necessary. Other passes can remove the extra block.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
0 files changed, 0 insertions, 0 deletions