summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
parentdf1ed0099ba6cb47fc4995e0de5128e20a05f5cb (diff)
downloadbcm5719-llvm-72fdb32dac0193b009f65b6e42aa224e88ecfd74.tar.gz
bcm5719-llvm-72fdb32dac0193b009f65b6e42aa224e88ecfd74.zip
[libFuzzer] make sure to update CurrentUnit when drilling
llvm-svn: 257560
Diffstat (limited to 'llvm/lib')
-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 089e911a697..5237682ff24 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++;
OpenPOWER on IntegriCloud