summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerMain.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-02-04 22:20:09 +0000
committerKostya Serebryany <kcc@google.com>2015-02-04 22:20:09 +0000
commit33f866922a4302bba872b922520b88574bc9ea93 (patch)
treef7220ea4671e9a0212e1184451b589cf60ae70ef /llvm/lib/Fuzzer/FuzzerMain.cpp
parent2f09c46f807c99a69c1a5a2a2f75fc1bcc76d7d5 (diff)
downloadbcm5719-llvm-33f866922a4302bba872b922520b88574bc9ea93.tar.gz
bcm5719-llvm-33f866922a4302bba872b922520b88574bc9ea93.zip
[fuzzer] add -runs=N to limit the number of runs per session. Also, make sure we do some mutations w/o cross over.
llvm-svn: 228214
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerMain.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerMain.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMain.cpp b/llvm/lib/Fuzzer/FuzzerMain.cpp
index 0a852ed4257..35e50f0ee31 100644
--- a/llvm/lib/Fuzzer/FuzzerMain.cpp
+++ b/llvm/lib/Fuzzer/FuzzerMain.cpp
@@ -11,7 +11,6 @@
#include "FuzzerInternal.h"
-#include <climits>
#include <cstring>
#include <unistd.h>
#include <iostream>
@@ -164,6 +163,8 @@ int main(int argc, char **argv) {
Options.MutateDepth = Flags.mutate_depth;
Options.ExitOnFirst = Flags.exit_on_first;
Options.UseFullCoverageSet = Flags.use_full_coverage_set;
+ if (Flags.runs >= 0)
+ Options.MaxNumberOfRuns = Flags.runs;
if (!inputs.empty())
Options.OutputCorpus = inputs[0];
Fuzzer F(Options);
OpenPOWER on IntegriCloud