summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-fuzzer
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Use PRIVATE in target_link_libraries for fuzzers.Matt Morehouse2017-12-062-1/+2
| | | | | | Several fuzzers were missed by r319840. llvm-svn: 319948
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* [cmake] Rename LIB_FUZZING_ENGINE to LLVM_LIB_FUZZING_ENGINE.Matt Morehouse2017-10-121-3/+3
| | | | llvm-svn: 315630
* [clang-fuzzer] Allow linking with any fuzzing engine.Matt Morehouse2017-10-111-1/+5
| | | | | | | | | | | | | | | | | Summary: Makes clang-[proto-]fuzzer compatible with flags specified by OSS-Fuzz. https://llvm.org/pr34314 Reviewers: vitalybuka, kcc Reviewed By: kcc Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D38812 llvm-svn: 315486
* Reland "[clang-fuzzer] Allow building without coverage instrumentation."Matt Morehouse2017-10-113-54/+83
| | | | | | This relands r315336 after fixing bot breakage. llvm-svn: 315465
* [clang-fuzzer] Fix shared library dependencies.Matt Morehouse2017-10-113-3/+5
| | | | llvm-svn: 315463
* Revert "[clang-fuzzer] Allow building without coverage instrumentation."Matt Morehouse2017-10-103-82/+53
| | | | | | | This reverts r315336 due to build breakage with gcc. http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/2173 llvm-svn: 315355
* [clang-fuzzer] Build proto-to-cxx with fuzzer-no-link.Matt Morehouse2017-10-101-0/+1
| | | | | | Makes it possible to build with any sanitizer or none at all. llvm-svn: 315339
* [clang-fuzzer] Allow building without coverage instrumentation.Matt Morehouse2017-10-103-53/+81
| | | | | | | | | | | | | | | | | | Summary: Compile with DummyClangFuzzer.cpp as entry point rather than libFuzzer's main when coverage instrumentation is missing. https://llvm.org/pr34314 Reviewers: kcc, bogner, vitalybuka Reviewed By: vitalybuka Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D38642 llvm-svn: 315336
* [clang-proto-fuzzer] Fix clang-proto-to-cxx build.Matt Morehouse2017-08-232-0/+2
| | | | llvm-svn: 311592
* Update Clang fuzzers to use libFuzzer bundled with the toolchain.George Karpenkov2017-08-231-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37043 llvm-svn: 311516
* [clang-proto-fuzzer] Update README.Matt Morehouse2017-08-211-8/+15
| | | | | | Add instructions on how to modify the compiler invocation. llvm-svn: 311345
* [clang-proto-fuzzer] Allow user-specified compiler arguments.Matt Morehouse2017-08-181-1/+17
| | | | | | | | | | | | | | | | | | | Summary: Arguments can be specified after -ignore_remaining_args=1 to modify the compiler invocation. For example, the following command-line will fuzz LLVM with a custom optimization level and target triple: clang-proto-fuzzer CORPUS/ -ignore_remaining_args -O3 \ -triple arm64-apple-ios9 Reviewers: vitalybuka, kcc Reviewed By: vitalybuka Subscribers: aemerson, cfe-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D36882 llvm-svn: 311185
* Add a Dockerfile for clang-proto-fuzzerKostya Serebryany2017-08-122-0/+39
| | | | | | | | | | | | | | Summary: Add a Dockerfile for clang-proto-fuzzer Reviewers: morehouse, vitalybuka Reviewed By: morehouse Subscribers: hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D36635 llvm-svn: 310774
* [clang-fuzzer] Resolve proto dependenciesVitaly Buka2017-08-091-1/+4
| | | | llvm-svn: 310441
* Integrate Kostya's clang-proto-fuzzer with LLVM.Matt Morehouse2017-08-0812-43/+503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 310408
* do more processing in clang-fuzzer (use EmitAssemblyAction)Kostya Serebryany2017-07-142-3/+11
| | | | | | | | | | | | | | Summary: use EmitAssemblyAction in clang-fuzzer Reviewers: klimek, rsmith Reviewed By: klimek Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D34267 llvm-svn: 308045
* Unbreak the clang-fuzzer build after r291184.Benjamin Kramer2017-01-111-1/+1
| | | | llvm-svn: 291681
* Add missing header in ClangFuzzer (after r275882 cleanup)Mehdi Amini2016-07-181-0/+1
| | | | llvm-svn: 275906
* [libFuzzer] make LLVMFuzzerTestOneInput (the fuzzer target function) return ↵Kostya Serebryany2015-10-021-1/+2
| | | | | | int instead of void. (following llvm r249214) llvm-svn: 249215
* Fix clang-fuzzer build after r242499.Adrian Prantl2015-07-171-1/+1
| | | | llvm-svn: 242505
* [clang-fuzzer] Update clang-fuzzer to API change in r240225.Alexey Samsonov2015-06-251-1/+4
| | | | llvm-svn: 240685
* revert r237081 -- bad idea (-lcrypt may not be present)Kostya Serebryany2015-05-121-1/+0
| | | | llvm-svn: 237086
* add -lcrypto to clang and clang-format fuzzers (lib/Fuzzer will soon require it)Kostya Serebryany2015-05-121-1/+2
| | | | llvm-svn: 237081
* fix clang-fuzzer and clang-format-fuzzer Kostya Serebryany2015-05-071-1/+1
| | | | llvm-svn: 236691
* [clang-fuzzer] make clang-fuzzer slightly faster by removing one redundant ↵Kostya Serebryany2015-05-041-2/+2
| | | | | | directory scan llvm-svn: 236459
* Gating clang-fuzzer on the same conditions required to build the LLVMFuzzer ↵Aaron Ballman2015-04-061-16/+18
| | | | | | library. Otherwise, we can run into a situation where clang-fuzzer attempts to build, but its dependency was never built. llvm-svn: 234170
* Make the clang-fuzzer use the CompilerInstance directly.Manuel Klimek2015-03-281-5/+16
| | | | | | Going through the driver is too slow. llvm-svn: 233459
* Add initial version of a clang-fuzzer.Manuel Klimek2015-03-282-0/+50
llvm-svn: 233455
OpenPOWER on IntegriCloud