blob: 15a378020b8553e23f9007e202b1831294d6ea82 [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;
kcc1f5638d2017-12-08 22:21:42 +000021 size_t ExperimentalLenControl = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000022 int UnitTimeoutSec = 300;
23 int TimeoutExitCode = 77;
24 int ErrorExitCode = 77;
25 int MaxTotalTimeSec = 0;
26 int RssLimitMb = 0;
kcc120e40b2017-12-01 22:12:04 +000027 int MallocLimitMb = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000028 bool DoCrossOver = true;
29 int MutateDepth = 5;
kccb6836be2017-12-01 19:18:38 +000030 bool ReduceDepth = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000031 bool UseCounters = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000032 bool UseMemmem = true;
33 bool UseCmp = false;
34 bool UseValueProfile = false;
35 bool Shrink = false;
36 bool ReduceInputs = false;
37 int ReloadIntervalSec = 1;
38 bool ShuffleAtStartUp = true;
39 bool PreferSmall = true;
40 size_t MaxNumberOfRuns = -1L;
41 int ReportSlowUnits = 10;
42 bool OnlyASCII = false;
43 std::string OutputCorpus;
44 std::string ArtifactPrefix = "./";
45 std::string ExactArtifactPath;
46 std::string ExitOnSrcPos;
47 std::string ExitOnItem;
48 bool SaveArtifacts = true;
49 bool PrintNEW = true; // Print a status line when new units are found;
50 bool PrintNewCovPcs = false;
kccec9da662017-08-28 22:52:22 +000051 int PrintNewCovFuncs = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000052 bool PrintFinalStats = false;
53 bool PrintCorpusStats = false;
54 bool PrintCoverage = false;
55 bool DumpCoverage = false;
dor1s06fb50c2017-10-05 22:41:03 +000056 bool UseClangCoverage = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000057 bool DetectLeaks = true;
alekseyshld995b552017-10-23 22:04:30 +000058 int PurgeAllocatorIntervalSec = 1;
kcc20fc0672017-10-11 01:44:26 +000059 int UseFeatureFrequency = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000060 int TraceMalloc = 0;
61 bool HandleAbrt = false;
62 bool HandleBus = false;
63 bool HandleFpe = false;
64 bool HandleIll = false;
65 bool HandleInt = false;
66 bool HandleSegv = false;
67 bool HandleTerm = false;
68 bool HandleXfsz = false;
kcc1239a992017-11-09 20:30:19 +000069 bool HandleUsr1 = false;
70 bool HandleUsr2 = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000071};
72
73} // namespace fuzzer
74
75#endif // LLVM_FUZZER_OPTIONS_H