blob: e0baf69a749cfc2deabc98ed22e6d7e3daefc6ba [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//
2// The LLVM Compiler Infrastructure
3//
4// This file is distributed under the University of Illinois Open Source
5// License. See LICENSE.TXT for details.
6//
7//===----------------------------------------------------------------------===//
8// fuzzer::FuzzingOptions
9//===----------------------------------------------------------------------===//
10
11#ifndef LLVM_FUZZER_OPTIONS_H
12#define LLVM_FUZZER_OPTIONS_H
13
14#include "FuzzerDefs.h"
15
16namespace fuzzer {
17
18struct FuzzingOptions {
19 int Verbosity = 1;
20 size_t MaxLen = 0;
21 bool ExperimentalLenControl = false;
22 int UnitTimeoutSec = 300;
23 int TimeoutExitCode = 77;
24 int ErrorExitCode = 77;
25 int MaxTotalTimeSec = 0;
26 int RssLimitMb = 0;
27 bool DoCrossOver = true;
28 int MutateDepth = 5;
kccb6836be2017-12-01 19:18:38 +000029 bool ReduceDepth = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000030 bool UseCounters = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000031 bool UseMemmem = true;
32 bool UseCmp = false;
33 bool UseValueProfile = false;
34 bool Shrink = false;
35 bool ReduceInputs = false;
36 int ReloadIntervalSec = 1;
37 bool ShuffleAtStartUp = true;
38 bool PreferSmall = true;
39 size_t MaxNumberOfRuns = -1L;
40 int ReportSlowUnits = 10;
41 bool OnlyASCII = false;
42 std::string OutputCorpus;
43 std::string ArtifactPrefix = "./";
44 std::string ExactArtifactPath;
45 std::string ExitOnSrcPos;
46 std::string ExitOnItem;
47 bool SaveArtifacts = true;
48 bool PrintNEW = true; // Print a status line when new units are found;
49 bool PrintNewCovPcs = false;
kccec9da662017-08-28 22:52:22 +000050 int PrintNewCovFuncs = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000051 bool PrintFinalStats = false;
52 bool PrintCorpusStats = false;
53 bool PrintCoverage = false;
54 bool DumpCoverage = false;
dor1s06fb50c2017-10-05 22:41:03 +000055 bool UseClangCoverage = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000056 bool DetectLeaks = true;
alekseyshld995b552017-10-23 22:04:30 +000057 int PurgeAllocatorIntervalSec = 1;
kcc20fc0672017-10-11 01:44:26 +000058 int UseFeatureFrequency = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000059 int TraceMalloc = 0;
60 bool HandleAbrt = false;
61 bool HandleBus = false;
62 bool HandleFpe = false;
63 bool HandleIll = false;
64 bool HandleInt = false;
65 bool HandleSegv = false;
66 bool HandleTerm = false;
67 bool HandleXfsz = false;
kcc1239a992017-11-09 20:30:19 +000068 bool HandleUsr1 = false;
69 bool HandleUsr2 = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000070};
71
72} // namespace fuzzer
73
74#endif // LLVM_FUZZER_OPTIONS_H