summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerDriver.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-02-18 21:49:10 +0000
committerKostya Serebryany <kcc@google.com>2016-02-18 21:49:10 +0000
commita35f7d383faaab6b543022fbeceb6bdf9c274460 (patch)
tree2cf83d1879bef2cb57efe4325d5e66190b86d860 /llvm/lib/Fuzzer/FuzzerDriver.cpp
parent88980d051a3ed8c0f958a6b6473c836c6215b73d (diff)
downloadbcm5719-llvm-a35f7d383faaab6b543022fbeceb6bdf9c274460.tar.gz
bcm5719-llvm-a35f7d383faaab6b543022fbeceb6bdf9c274460.zip
[libFuzzer] only read MaxLen bytes from every file in the corpus to speedup loading the corpus
llvm-svn: 261267
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerDriver.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerDriver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp
index 2c32fed68c2..a3722e74bc7 100644
--- a/llvm/lib/Fuzzer/FuzzerDriver.cpp
+++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp
@@ -356,7 +356,7 @@ static int FuzzerDriver(const std::vector<std::string> &Args,
F.RereadOutputCorpus();
for (auto &inp : *Inputs)
if (inp != Options.OutputCorpus)
- F.ReadDir(inp, nullptr);
+ F.ReadDir(inp, nullptr, Options.MaxLen);
if (F.CorpusSize() == 0)
F.AddToCorpus(Unit()); // Can't fuzz empty corpus, so add an empty input.
OpenPOWER on IntegriCloud