[llvm] r310881 - [libFuzzer] try to use less RAM while processing the initial corpus
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 13:34:36 PDT 2017
Author: kcc
Date: Mon Aug 14 13:34:35 2017
New Revision: 310881
URL: http://llvm.org/viewvc/llvm-project?rev=310881&view=rev
Log:
[libFuzzer] try to use less RAM while processing the initial corpus
Modified:
llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=310881&r1=310880&r2=310881&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Mon Aug 14 13:34:35 2017
@@ -388,11 +388,12 @@ void Fuzzer::ShuffleAndMinimize(UnitVect
uint8_t dummy;
ExecuteCallback(&dummy, 0);
- for (const auto &U : *InitialCorpus) {
+ for (auto &U : *InitialCorpus) {
RunOne(U.data(), U.size());
CheckExitOnSrcPosOrItem();
TryDetectingAMemoryLeak(U.data(), U.size(),
/*DuringInitialCorpusExecution*/ true);
+ U.clear();
}
PrintStats("INITED");
if (Corpus.empty()) {
More information about the llvm-commits
mailing list