[PATCH] D20301: [libfuzzer] Trying random unit prefixes during corpus load.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 15:01:54 PDT 2016
kcc added inline comments.
================
Comment at: lib/Fuzzer/FuzzerFlags.def:87
@@ -86,2 +86,3 @@
"reaching this limit of RSS memory usage.")
+FUZZER_FLAG_INT(truncate_units, 1, "Try truncated units when loading corpus.")
----------------
I'd prefer to have this flag of by default for now
================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:362
@@ +361,3 @@
+ size_t MaxCorpusLen = 0;
+ for (const auto &U : Corpus) {
+ MaxCorpusLen = std::max(MaxCorpusLen, U.size());
----------------
no {}, same below
================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:379
@@ +378,3 @@
+ }
+ std::sort(Sizes.begin(), Sizes.end());
+
----------------
do you expect duplicates here?
================
Comment at: lib/Fuzzer/test/FuzzerUnittest.cpp:16
@@ -15,1 +15,3 @@
+extern "C" int EmptyLLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+ return 0;
----------------
make it static and not extern "C"
http://reviews.llvm.org/D20301
More information about the llvm-commits
mailing list