[PATCH] D24049: [libfuzzer] simplified unit truncation; do not write trunc items to disc
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 30 11:59:03 PDT 2016
kcc accepted this revision.
kcc added a comment.
This revision is now accepted and ready to land.
LGTM with nits
================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:379
@@ -397,2 +378,3 @@
for (const auto &U : Corpus) {
- if (S < U.size() && RunOne(U.data(), S)) {
+ uint64_t S = MD.GetRand()(U.size() * Fraction);
+ if (RunOne(U.data(), S)) {
----------------
if (!S) continue;
================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:387
@@ -405,3 +386,3 @@
}
- PrintStats("TRUNC ");
+ Printf("\tTRUNC units: %zd\n", TruncInputs);
}
----------------
Printf("INFO: TRUNC: %zd truncated units added to the in-memory corpus", ...);
https://reviews.llvm.org/D24049
More information about the llvm-commits
mailing list