Build a lib/Fuzzer version for llvm-as.
authorKarl Schimpf <kschimpf@google.com>
Mon, 31 Aug 2015 17:55:32 +0000 (17:55 +0000)
committerKarl Schimpf <kschimpf@google.com>
Mon, 31 Aug 2015 17:55:32 +0000 (17:55 +0000)
commit1318d71a755481fc0d43be15a4611db96263896d
tree2b198d4ac3363235fb53588e58b441ee27693f33
parentae65a7a88e8cf63c9ad01e1483181cb7e7bf6f55
Build a lib/Fuzzer version for llvm-as.

Summary:
This CL is associated with a fuzzing effort to find bugs in LLVM. The
first step is to fuzz llvm-as to find potential issues in generating
IR. Both afl-fuzz and LLVM's lib/Fuzzer are being used.

This CL introduces the executable that implements the in-process
fuzzer using LLVM's lib/Fuzzer. The motivation for using lib/Fuzzer is
based on time comparisons between afl-fuzz and lib/Fuzzer. Early
results show that per-process, the lib/Fuzzer implemenation of llvm-as
(i.e. this CL) generates over 30 times the number of mutations found
by afl-fuzz, per hour runtime. The speedup is due to the removal of
overhead of forking a process, and loading the executable into memory.

I placed this under the tools directory, since it is an executable. It
is also only conditionally built if (using cmake) the flag
LLVM_USEE_SANITIZE_COVERAGE is used, so that it isn't built by
default.

Reviewers: kcc, filcab

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246458 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-as-fuzzer/CMakeLists.txt [new file with mode: 0644]
tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp [new file with mode: 0644]