blob: 946f0b9d60b01fb635df2f7b56ef13e96691e2b8 [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;
morehouse8c42ada2018-02-13 20:52:15 +000021 size_t LenControl = 1000;
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;
kcc3acbe072018-05-16 23:26:37 +000048 std::string FocusFunction;
george.karpenkov29efa6d2017-08-21 23:25:50 +000049 bool SaveArtifacts = true;
50 bool PrintNEW = true; // Print a status line when new units are found;
51 bool PrintNewCovPcs = false;
kccec9da662017-08-28 22:52:22 +000052 int PrintNewCovFuncs = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000053 bool PrintFinalStats = false;
54 bool PrintCorpusStats = false;
55 bool PrintCoverage = false;
kcca7dd2a92018-05-21 19:47:00 +000056 bool DumpCoverage = 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