[libFuzzer] make sure to update CurrentUnit when drilling

llvm-svn: 257560
This commit is contained in:
Kostya Serebryany 2016-01-13 01:58:27 +00:00
parent dc3ea04303
commit ec88d2d728

View File

@ -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++;