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

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 15:02:28 PDT 2017


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:
> vitalybuka wrote:
> > You already download mutator, so maybe just DOWNLOAD_PROTOBUF and simplify this piece?
> That would be simpler if only protobuf-mutator needed protobuf.  But since we need protobuf for some of the source files here, it would actually make this CMakeLists.txt more complicated since it would have to fish for the paths where protobuf mutator builds protobuf and then redefine variables.
It's ok to share code, but I don't see fuzzer with accept string as is.


================
Comment at: clang/tools/clang-fuzzer/cxx_proto.proto:16
+
+syntax = "proto2";
+//option cc_api_version = 2;
----------------
I'd suggest proto3


================
Comment at: clang/tools/clang-fuzzer/cxx_proto.proto:93
+}
+
+package clang_fuzzer;
----------------
morehouse wrote:
> vitalybuka wrote:
> > message CxxInput {
> >   required Function f = 1;
> >   required int/enum opt_level = 2;
> >   required enum tripple = 3;
> >   required scalar-evolution-max-arith-depth ...
> > }
> Interesting idea.  This would allow for protobuf-mutator to choose different option combinations, if I understand correctly.
> 
> Is that worth adding to this initial patch, though?
yes, instead of CXX_FUZZ_MORE


https://reviews.llvm.org/D36324





More information about the cfe-commits mailing list