aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Fuzzer/FuzzerLoop.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-01-13 01:58:27 +0000
committerKostya Serebryany <kcc@google.com>2016-01-13 01:58:27 +0000
commit72fdb32dac0193b009f65b6e42aa224e88ecfd74 (patch)
tree3bca4b33abbc16e9ecad983b9eccd4f6deef860d /llvm/lib/Fuzzer/FuzzerLoop.cpp
parentdf1ed0099ba6cb47fc4995e0de5128e20a05f5cb (diff)
downloadllvm-72fdb32dac0193b009f65b6e42aa224e88ecfd74.zip
llvm-72fdb32dac0193b009f65b6e42aa224e88ecfd74.tar.gz
llvm-72fdb32dac0193b009f65b6e42aa224e88ecfd74.tar.bz2
[libFuzzer] make sure to update CurrentUnit when drilling
llvm-svn: 257560
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerLoop.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index 089e911..5237682 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -455,12 +455,15 @@ void Fuzzer::Drill() {
PrintStats("REINIT");
SavedOutputCorpusPath.swap(Options.OutputCorpus);
- for (auto &U : SavedCorpus)
+ for (auto &U : SavedCorpus) {
+ CurrentUnit = U;
RunOne(U);
+ }
PrintStats("MERGE ");
Options.PrintNEW = true;
size_t NumMerged = 0;
for (auto &U : Corpus) {
+ CurrentUnit = U;
if (RunOne(U)) {
PrintStatusForNewUnit(U);
NumMerged++;