This is an archive of the discontinued LLVM Phabricator instance.

[FuzzMutate] Handle BB without predecessor, avoid insertion after `musttail call`, avoid sinking token type
ClosedPublic

Authored by HazyFish on Jun 1 2023, 2:06 PM.

Details

Summary

FuzzMutate didn't consider some corner cases and leads to mutation failure when mutating some modules.
This patch fixes 3 bugs:

  • Add null check when encountering basic blocks without predecessor to avoid segmentation fault
  • Avoid insertion after musttail call instruction
  • Avoid sinking token type

Unit tests are also added.

Diff Detail

Event Timeline

HazyFish created this revision.Jun 1 2023, 2:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2023, 2:06 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
HazyFish requested review of this revision.Jun 1 2023, 2:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2023, 2:06 PM
HazyFish updated this revision to Diff 527618.Jun 1 2023, 2:15 PM
HazyFish retitled this revision from [FuzzMutate] Handle BB with no predecessor and avoid insertion after `musttail call` to [FuzzMutate] Handle BB without predecessor, avoid insertion after `musttail call`, avoid sinking token type.
HazyFish edited the summary of this revision. (Show Details)

Avoid sinking token type

Peter edited the summary of this revision. (Show Details)Jun 1 2023, 2:25 PM
Peter accepted this revision.Jun 1 2023, 7:51 PM
This revision is now accepted and ready to land.Jun 1 2023, 7:51 PM