summaryrefslogtreecommitdiff
path: root/test/lld/em_asm_pthread.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-03-22 16:13:33 -0700
committerGitHub <noreply@github.com>2021-03-22 16:13:33 -0700
commit8dddd9f3a3060d831af48387165703e1d8efcc63 (patch)
tree884a4f848abaae13091be910cdf6de1a100951c0 /test/lld/em_asm_pthread.cpp
parent5c17d353ce24dffabf05d7fd2bf9d20a3618962f (diff)
downloadbinaryen-8dddd9f3a3060d831af48387165703e1d8efcc63.tar.gz
binaryen-8dddd9f3a3060d831af48387165703e1d8efcc63.tar.bz2
binaryen-8dddd9f3a3060d831af48387165703e1d8efcc63.zip
Fix a fuzz regression from #3669 (#3715)
I'm not entirely sure how LUB removal made this noticeable, as it seems to be a pre-existing bug. However, somehow before #3669 it was not noticable - perhaps the finalize code worked around it. The bug is that RemoveUnusedBrs was moving code around and finalizing the parent before the child. The correct pattern is always to work from the children outwards, as otherwise the parent is trying to finalize itself based on non-finalized children. The fix is to just not finalize in the stealSlice method. The caller can do it after finishing any other work it has. As part of this refactoring, move stealSlice into the single pass that uses it; aside from that being more orderly, this method is really not a general-purpose tool, it is quite specific to what RemoveUnusedBrs does, and it might easily be used incorrectly elsewhere.
Diffstat (limited to 'test/lld/em_asm_pthread.cpp')
0 files changed, 0 insertions, 0 deletions