2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //===----------------------------------------------------------------------===//
7 // fuzzer::FuzzingOptions
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_FUZZER_OPTIONS_H
11 #define LLVM_FUZZER_OPTIONS_H
13 #include "FuzzerDefs.h"
17 struct FuzzingOptions {
20 size_t LenControl = 1000;
21 int UnitTimeoutSec = 300;
22 int TimeoutExitCode = 70;
24 int InterruptExitCode = 72;
25 int ErrorExitCode = 77;
26 bool IgnoreTimeouts = true;
27 bool IgnoreOOMs = true;
28 bool IgnoreCrashes = false;
29 int MaxTotalTimeSec = 0;
31 int MallocLimitMb = 0;
32 bool DoCrossOver = true;
34 bool ReduceDepth = false;
35 bool UseCounters = false;
36 bool UseMemmem = true;
38 int UseValueProfile = false;
40 bool ReduceInputs = false;
41 int ReloadIntervalSec = 1;
42 bool ShuffleAtStartUp = true;
43 bool PreferSmall = true;
44 size_t MaxNumberOfRuns = -1L;
45 int ReportSlowUnits = 10;
46 bool OnlyASCII = false;
47 std::string OutputCorpus;
48 std::string ArtifactPrefix = "./";
49 std::string ExactArtifactPath;
50 std::string ExitOnSrcPos;
51 std::string ExitOnItem;
52 std::string FocusFunction;
53 std::string DataFlowTrace;
54 std::string CollectDataFlow;
55 std::string FeaturesDir;
57 bool SaveArtifacts = true;
58 bool PrintNEW = true; // Print a status line when new units are found;
59 bool PrintNewCovPcs = false;
60 int PrintNewCovFuncs = 0;
61 bool PrintFinalStats = false;
62 bool PrintCorpusStats = false;
63 bool PrintCoverage = false;
64 bool DumpCoverage = false;
65 bool DetectLeaks = true;
66 int PurgeAllocatorIntervalSec = 1;
68 bool HandleAbrt = false;
69 bool HandleBus = false;
70 bool HandleFpe = false;
71 bool HandleIll = false;
72 bool HandleInt = false;
73 bool HandleSegv = false;
74 bool HandleTerm = false;
75 bool HandleXfsz = false;
76 bool HandleUsr1 = false;
77 bool HandleUsr2 = false;
78 bool LazyCounters = false;
83 #endif // LLVM_FUZZER_OPTIONS_H