diff options
author | Matt Morehouse <mascasa@google.com> | 2017-08-08 20:15:04 +0000 |
---|---|---|
committer | Matt Morehouse <mascasa@google.com> | 2017-08-08 20:15:04 +0000 |
commit | a40a94c65d58855b806dc73752c2f559a9c14921 (patch) | |
tree | 02faecdf14d8ca8e07d12b1f8fe22eceb0bb4222 /CMakeLists.txt | |
parent | 2cac4c7ed196ae69977c4624745e246b2ae8eedf (diff) | |
download | clang-a40a94c65d58855b806dc73752c2f559a9c14921.tar.gz |
Integrate Kostya's clang-proto-fuzzer with LLVM.
Summary:
The clang-proto-fuzzer models a subset of C++ as a protobuf and
uses libprotobuf-mutator to generate interesting mutations of C++
programs. Clang-proto-fuzzer has already found several bugs in
Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747,
https://bugs.llvm.org/show_bug.cgi?id=33749).
As with clang-fuzzer, clang-proto-fuzzer requires the following
cmake flags:
- CMAKE_C_COMPILER=clang
- CMAKE_CXX_COMPILER=clang++
- LLVM_USE_SANITIZE_COVERAGE=YES // needed for libFuzzer
- LLVM_USE_SANITIZER=Address // needed for libFuzzer
In addition, clang-proto-fuzzer requires:
- CLANG_ENABLE_PROTO_FUZZER=ON
clang-proto-fuzzer also requires the following dependencies:
- binutils // needed for libprotobuf-mutator
- liblzma-dev // needed for libprotobuf-mutator
- libz-dev // needed for libprotobuf-mutator
- docbook2x // needed for libprotobuf-mutator
- Recent version of protobuf [3.3.0 is known to work]
A working version of libprotobuf-mutator will automatically be
downloaded and built as an external project.
Implementation of clang-proto-fuzzer provided by Kostya
Serebryany.
https://bugs.llvm.org/show_bug.cgi?id=33829
Reviewers: kcc, vitalybuka, bogner
Reviewed By: kcc, vitalybuka
Subscribers: thakis, mgorny, cfe-commits
Differential Revision: https://reviews.llvm.org/D36324
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f26f2d6bf..c1da2cff1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -377,6 +377,8 @@ option(CLANG_ENABLE_STATIC_ANALYZER "Build static analyzer." ON) option(CLANG_ANALYZER_BUILD_Z3 "Build the static analyzer with the Z3 constraint manager." OFF) +option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF) + if(NOT CLANG_ENABLE_STATIC_ANALYZER AND (CLANG_ENABLE_ARCMT OR CLANG_ANALYZER_BUILD_Z3)) message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3") endif() |