]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/fuzzer/FuzzerOptions.h
Add compiler-rt's libFuzzer, not connected to buildworld yet.
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / fuzzer / FuzzerOptions.h
1 //
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
16 namespace fuzzer {
17
18 struct FuzzingOptions {
19   int Verbosity = 1;
20   size_t MaxLen = 0;
21   size_t LenControl = 1000;
22   int UnitTimeoutSec = 300;
23   int TimeoutExitCode = 77;
24   int ErrorExitCode = 77;
25   int MaxTotalTimeSec = 0;
26   int RssLimitMb = 0;
27   int MallocLimitMb = 0;
28   bool DoCrossOver = true;
29   int MutateDepth = 5;
30   bool ReduceDepth = false;
31   bool UseCounters = false;
32   bool UseMemmem = true;
33   bool UseCmp = false;
34   int 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   std::string FocusFunction;
49   std::string DataFlowTrace;
50   bool SaveArtifacts = true;
51   bool PrintNEW = true; // Print a status line when new units are found;
52   bool PrintNewCovPcs = false;
53   int PrintNewCovFuncs = 0;
54   bool PrintFinalStats = false;
55   bool PrintMutationStats = false;
56   bool PrintCorpusStats = false;
57   bool PrintCoverage = false;
58   bool PrintUnstableStats = false;
59   int HandleUnstable = 0;
60   bool DumpCoverage = false;
61   bool DetectLeaks = true;
62   int PurgeAllocatorIntervalSec = 1;
63   int  TraceMalloc = 0;
64   bool HandleAbrt = false;
65   bool HandleBus = false;
66   bool HandleFpe = false;
67   bool HandleIll = false;
68   bool HandleInt = false;
69   bool HandleSegv = false;
70   bool HandleTerm = false;
71   bool HandleXfsz = false;
72   bool HandleUsr1 = false;
73   bool HandleUsr2 = false;
74 };
75
76 }  // namespace fuzzer
77
78 #endif  // LLVM_FUZZER_OPTIONS_H