[all-commits] [llvm/llvm-project] 258cd1: [FuzzMutate] Handle BB without predecessor, avoid ...

Henry Yu via All-commits all-commits at lists.llvm.org
Thu Jun 1 19:52:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 258cd1fc38aa042723b1823ee2bb463928eab35b
      https://github.com/llvm/llvm-project/commit/258cd1fc38aa042723b1823ee2bb463928eab35b
  Author: Henry Yu <hnryu at ucdavis.edu>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M llvm/lib/FuzzMutate/IRMutator.cpp
    M llvm/lib/FuzzMutate/RandomIRBuilder.cpp
    M llvm/unittests/FuzzMutate/RandomIRBuilderTest.cpp
    M llvm/unittests/FuzzMutate/StrategiesTest.cpp

  Log Message:
  -----------
  [FuzzMutate] Handle BB without predecessor, avoid insertion after `musttail call`, avoid sinking token type

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.

Reviewed By: Peter

Differential Revision: https://reviews.llvm.org/D151936




More information about the All-commits mailing list