diff options
author | Kostya Serebryany <kcc@google.com> | 2017-08-14 20:34:35 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-08-14 20:34:35 +0000 |
commit | 70284788c6b677eb08f51f91b906d7000ec1e3a1 (patch) | |
tree | 16d747494794faf44ce55d2394ce8b7b8f29acce /lib/Fuzzer | |
parent | 29a5193a622e2f9690dfed2fe26b592cdac27e9e (diff) |
[libFuzzer] try to use less RAM while processing the initial corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Fuzzer')
-rw-r--r-- | lib/Fuzzer/FuzzerLoop.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Fuzzer/FuzzerLoop.cpp b/lib/Fuzzer/FuzzerLoop.cpp index 2064783f340..234945932bb 100644 --- a/lib/Fuzzer/FuzzerLoop.cpp +++ b/lib/Fuzzer/FuzzerLoop.cpp @@ -388,11 +388,12 @@ void Fuzzer::ShuffleAndMinimize(UnitVector *InitialCorpus) { 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()) { |