[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/cmake/modules/ProtobufMutator.cmake:6 + +ExternalProject_Add(${PBM_PREFIX} + PREFIX ${PBM_PREFIX} Just noticed, for cmake projects shorter syntax can be used. Example:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310408: Integrate Kostya's clang-proto-fuzzer with LLVM. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D36324?vs=110265=110269#toc Repository: rL LLVM

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110265. morehouse added a comment. - README tweaks. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt clang/cmake/modules/ProtobufMutator.cmake clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ClangFuzzer.cpp

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110264. morehouse added a comment. - Add run instructions to README. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt clang/cmake/modules/ProtobufMutator.cmake clang/tools/clang-fuzzer/CMakeLists.txt

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc accepted this revision. kcc added a comment. LGTM with a couple if nits in the README Thanks! Comment at: clang/tools/clang-fuzzer/README.txt:11 +class, producing valid C++ programs in the process. As a result, +clang-proto-fuzzer is better at stressing deeper layers of

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110262. morehouse added a comment. - Add README.txt. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt clang/cmake/modules/ProtobufMutator.cmake clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ClangFuzzer.cpp

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Looks good! Now, please add a clang/tools/clang-fuzzer/README.txt describing how to build the fuzzers (both the old one and the new one) and how to run them. For the new one explain how to install the deps https://reviews.llvm.org/D36324

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110222. morehouse added a comment. - Define GOOGLE_PROTOBUF_NO_RTTI to remove RTTI requirement. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt clang/cmake/modules/ProtobufMutator.cmake clang/tools/clang-fuzzer/CMakeLists.txt

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. In https://reviews.llvm.org/D36324#835415, @morehouse wrote: > In https://reviews.llvm.org/D36324#834660, @kcc wrote: > > > Why do we need LLVM_ENABLE_RTTI=ON here? > > > Attempting to build without it yields all kinds of protobuf errors. For > example: > F4944099:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110215. morehouse added a comment. - Formatting and code cleanup. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt clang/cmake/modules/ProtobufMutator.cmake clang/tools/clang-fuzzer/CMakeLists.txt

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D36324#834660, @kcc wrote: > Why do we need LLVM_ENABLE_RTTI=ON here? Attempting to build without it yields all kinds of protobuf errors. For example: F4944099: image.png

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/tools/clang-fuzzer/cxx_proto.proto:17 +syntax = "proto2"; +//option cc_api_version = 2; + >> //option cc_api_version = 2; Please remove Comment at:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Why do we need LLVM_ENABLE_RTTI=ON here? https://reviews.llvm.org/D36324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 110111. morehouse added a comment. - Build protobuf-mutator with same build type as current build. - Remove unnecessary options from clang-proto-fuzzer. - Expand macro. https://reviews.llvm.org/D36324 Files: clang/CMakeLists.txt

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-07 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a reviewer: bogner. kcc added a comment. +bogner@ FYI Comment at: clang/tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:25 + +static void MaybePrint(const std::string ) { + static const char *env = getenv("CXXFUZZ_PRINT"); this is debug code, not

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/tools/clang-fuzzer/ClangFuzzer.cpp:20 extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) { std::string s((const char *)data, size); morehouse wrote: > morehouse wrote: > > vitalybuka wrote:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/ClangFuzzer.cpp:20 extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) { std::string s((const char *)data, size); morehouse wrote: > vitalybuka wrote: > > Do we want

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/tools/clang-fuzzer/CMakeLists.txt:12 +# Hack to bypass LLVM's cmake sources check and allow multiple libraries and +# executables from this directory. +set(LLVM_OPTIONAL_SOURCES morehouse wrote: >

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/cmake/modules/ProtobufMutator.cmake:13 +-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} +-DCMAKE_BUILD_TYPE=Debug + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} vitalybuka wrote: > Why this is debug? > I was just

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: clang/cmake/modules/ProtobufMutator.cmake:13 +-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} +-DCMAKE_BUILD_TYPE=Debug + BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} Why this is debug? Comment at:

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. In https://reviews.llvm.org/D36324#832271, @thakis wrote: > Why should this be part of llvm? This seems to come with very heavy > dependencies (protobuf), and LLVM has historically tried to minimize the > number of things it depends on. This fuzzer has already uncovered

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Why should this be part of llvm? This seems to come with very heavy dependencies (protobuf), and LLVM has historically tried to minimize the number of things it depends on. https://reviews.llvm.org/D36324 ___ cfe-commits

[PATCH] D36324: Integrate Kostya's clang-proto-fuzzer with LLVM.

2017-08-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: mgorny. 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.,