diff options
| author | Kostya Serebryany <kcc@google.com> | 2016-03-15 01:28:00 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2016-03-15 01:28:00 +0000 |
| commit | 0c5e3af862d9b594fef7609be8388342bdf5de89 (patch) | |
| tree | 60faf6268682c8e00fb91c586a216bf3a866a676 /llvm/lib/Fuzzer | |
| parent | 4ebb8a4761575ae8d352dfdcbe8e7829a372e60e (diff) | |
| download | bcm5719-llvm-0c5e3af862d9b594fef7609be8388342bdf5de89.tar.gz bcm5719-llvm-0c5e3af862d9b594fef7609be8388342bdf5de89.zip | |
[libFuzzer] use max_len exactly equal to the max size of input. Fix 32-bit build
llvm-svn: 263518
Diffstat (limited to 'llvm/lib/Fuzzer')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerDriver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp index 50a9cff2624..386caeffbc6 100644 --- a/llvm/lib/Fuzzer/FuzzerDriver.cpp +++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp @@ -270,6 +270,7 @@ static int FuzzerDriver(const std::vector<std::string> &Args, return RunInMultipleProcesses(Args, Flags.workers, Flags.jobs); const size_t kMaxSaneLen = 1 << 20; + const size_t kMinDefaultLen = 64; Fuzzer::FuzzingOptions Options; Options.Verbosity = Flags.verbosity; Options.MaxLen = Flags.max_len; @@ -373,7 +374,7 @@ static int FuzzerDriver(const std::vector<std::string> &Args, if (Options.MaxLen == 0) F.SetMaxLen( - std::min(std::max(64UL, 2 * F.MaxUnitSizeInCorpus()), kMaxSaneLen)); + std::min(std::max(kMinDefaultLen, F.MaxUnitSizeInCorpus()), kMaxSaneLen)); if (F.CorpusSize() == 0) F.AddToCorpus(Unit()); // Can't fuzz empty corpus, so add an empty input. |

