OSDN Git Service

[libFuzzer] do the merge faster and a bit less precise
authorKostya Serebryany <kcc@google.com>
Fri, 13 May 2016 22:11:23 +0000 (22:11 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 13 May 2016 22:11:23 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerLoop.cpp

index f2633ce..6b19a15 100644 (file)
@@ -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;
   }