Skip to content

Fix a fuzz regression from #3669#3715

Merged
kripken merged 4 commits into
mainfrom
fixfuzz
Mar 22, 2021
Merged

Fix a fuzz regression from #3669#3715
kripken merged 4 commits into
mainfrom
fixfuzz

Conversation

@kripken

@kripken kripken commented Mar 22, 2021

Copy link
Copy Markdown
Member

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.

@kripken kripken requested review from aheejin and tlively March 22, 2021 22:46
@kripken kripken merged commit 8dddd9f into main Mar 22, 2021
@kripken kripken deleted the fixfuzz branch March 22, 2021 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants