From: Kostya Serebryany Date: Wed, 13 Jan 2016 01:58:27 +0000 (+0000) Subject: [libFuzzer] make sure to update CurrentUnit when drilling X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=43a24b5d9351abd97a0e2378cd167bb9ee6d9a8d;ds=inline [libFuzzer] make sure to update CurrentUnit when drilling git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257560 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Fuzzer/FuzzerLoop.cpp b/lib/Fuzzer/FuzzerLoop.cpp index 089e911a697..5237682ff24 100644 --- a/lib/Fuzzer/FuzzerLoop.cpp +++ b/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++;