From d8c064b2e95d44769b94a218bdaa2d5e0dfbdd00 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 13 May 2016 22:11:23 +0000 Subject: [PATCH] [libFuzzer] do the merge faster and a bit less precise git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269497 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/FuzzerLoop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Fuzzer/FuzzerLoop.cpp b/lib/Fuzzer/FuzzerLoop.cpp index f2633ce91d9..6b19a157e2b 100644 --- a/lib/Fuzzer/FuzzerLoop.cpp +++ b/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; } -- 2.11.0