diff options
author | Kostya Serebryany <kcc@google.com> | 2016-10-08 23:24:45 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2016-10-08 23:24:45 +0000 |
commit | c5325ed29d01d2d24121fcc57249c7939d085814 (patch) | |
tree | b75d5abe290ada0a9061898b99365dc862eca895 /llvm/lib/Fuzzer/FuzzerDriver.cpp | |
parent | 8ec7b4f588fb1bf00672318d3e313480726dd8ef (diff) | |
download | bcm5719-llvm-c5325ed29d01d2d24121fcc57249c7939d085814.tar.gz bcm5719-llvm-c5325ed29d01d2d24121fcc57249c7939d085814.zip |
[libFuzzer] when shrinking the corpus, delete evicted files previously created by the current process
llvm-svn: 283682
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDriver.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerDriver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp index a00e49ef079..974bbca5600 100644 --- a/llvm/lib/Fuzzer/FuzzerDriver.cpp +++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp @@ -443,7 +443,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { Random Rand(Seed); MutationDispatcher MD(Rand, Options); - InputCorpus Corpus; + InputCorpus Corpus(Options.OutputCorpus); Fuzzer F(Callback, Corpus, MD, Options); for (auto &U: Dictionary) @@ -500,7 +500,8 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { UnitVector InitialCorpus; for (auto &Inp : *Inputs) { Printf("Loading corpus dir: %s\n", Inp.c_str()); - ReadDirToVectorOfUnits(Inp.c_str(), &InitialCorpus, nullptr, TemporaryMaxLen); + ReadDirToVectorOfUnits(Inp.c_str(), &InitialCorpus, nullptr, + TemporaryMaxLen, /*ExitOnError=*/false); } if (Options.MaxLen == 0) { |