[fuzzer] add -runs=N to limit the number of runs per session. Also, make sure we do some mutations w/o cross over.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany
2015-02-04 22:20:09 +00:00
parent 8054a41a27
commit 46c638cfc8
4 changed files with 18 additions and 9 deletions

View File

@@ -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);