diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp index f2633ce91d9e..6b19a157e2b4 100644 --- a/llvm/lib/Fuzzer/FuzzerLoop.cpp +++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp @@ -549,9 +549,10 @@ UnitVector Fuzzer::FindExtraUnits(const UnitVector &Initial, PrintStats(Stat); size_t NewSize = Corpus.size(); + assert(NewSize <= OldSize); Res.swap(Corpus); - if (NewSize == OldSize) + if (NewSize + 5 >= OldSize) break; OldSize = NewSize; }