[PATCH] D39555: Introduce llvm-opt-fuzzer for fuzzing optimization passes

Igor Laevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 08:18:58 PDT 2017


igor-laevsky created this revision.
Herald added a subscriber: mgorny.

Hi,

Seeing recent advances in fuzzing technologies for llvm (libFuzzer, FuzzMutate, OSSFuzz)
it's become reasonably simple to extend this approach for the general optimization
passes.

In this review I would like to propose a generic fuzzing target intended for the
optimization passes and various combinations of them. This is very initial implementation
which I tried to keep simple. Most of it's code is inherited from the llvm-isel-fuzzer.

This tool is intended to be run by the OSSFuzz, so interface is rather primitive. 
User is only required to specify target triple and optimization pipeline using 
the new pass manager syntax.

In general our primary goal here is to continuously run OSSFuzz testing for some of the llvm passes
which are not widely used (i.e passes which are not part of the default clang pipeline, IRCE,
Loop Predication, RS4GC and so on).

However I expect it would be simpler to start with the more popular passes just
to have a chance to stabilize infrastructure and figure out good workflow for the discovered bugs.
So after this tool is integrated to the tree (if no one will have objections), next step would be 
to start OSSFuzz project for the InstCombine, as being single most used pass.


https://reviews.llvm.org/D39555

Files:
  tools/llvm-opt-fuzzer/CMakeLists.txt
  tools/llvm-opt-fuzzer/DummyOptFuzzer.cpp
  tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39555.121316.patch
Type: text/x-patch
Size: 9587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171102/3b803f3c/attachment.bin>


More information about the llvm-commits mailing list