Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 1 | //===- FuzzerOptions.h - Internal header for the Fuzzer ---------*- C++ -* ===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // fuzzer::FuzzingOptions |
| 10 | //===----------------------------------------------------------------------===// |
| 11 | |
| 12 | #ifndef LLVM_FUZZER_OPTIONS_H |
| 13 | #define LLVM_FUZZER_OPTIONS_H |
| 14 | |
| 15 | #include "FuzzerDefs.h" |
| 16 | |
| 17 | namespace fuzzer { |
| 18 | |
| 19 | struct FuzzingOptions { |
| 20 | int Verbosity = 1; |
| 21 | size_t MaxLen = 0; |
Kostya Serebryany | 2a8440d | 2016-12-27 23:24:55 +0000 | [diff] [blame] | 22 | bool ExperimentalLenControl = false; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 23 | int UnitTimeoutSec = 300; |
| 24 | int TimeoutExitCode = 77; |
| 25 | int ErrorExitCode = 77; |
| 26 | int MaxTotalTimeSec = 0; |
| 27 | int RssLimitMb = 0; |
| 28 | bool DoCrossOver = true; |
| 29 | int MutateDepth = 5; |
| 30 | bool UseCounters = false; |
| 31 | bool UseIndirCalls = true; |
| 32 | bool UseMemcmp = true; |
| 33 | bool UseMemmem = true; |
Kostya Serebryany | a5f94fb | 2016-10-14 20:20:33 +0000 | [diff] [blame] | 34 | bool UseCmp = false; |
Kostya Serebryany | ab73c69 | 2016-09-23 00:46:18 +0000 | [diff] [blame] | 35 | bool UseValueProfile = false; |
Kostya Serebryany | d216922 | 2016-10-01 01:04:29 +0000 | [diff] [blame] | 36 | bool Shrink = false; |
Kostya Serebryany | 9adc7c8 | 2016-10-08 22:12:14 +0000 | [diff] [blame] | 37 | int ReloadIntervalSec = 1; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 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; |
Kostya Serebryany | 5ff481f | 2016-09-27 00:10:20 +0000 | [diff] [blame] | 46 | std::string ExitOnSrcPos; |
Kostya Serebryany | d216922 | 2016-10-01 01:04:29 +0000 | [diff] [blame] | 47 | std::string ExitOnItem; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 48 | bool SaveArtifacts = true; |
| 49 | bool PrintNEW = true; // Print a status line when new units are found; |
| 50 | bool OutputCSV = false; |
| 51 | bool PrintNewCovPcs = false; |
| 52 | bool PrintFinalStats = false; |
Kostya Serebryany | 29bb664 | 2016-09-21 22:42:17 +0000 | [diff] [blame] | 53 | bool PrintCorpusStats = false; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 54 | bool PrintCoverage = false; |
Mike Aizatsky | 9b415be | 2016-12-19 22:18:08 +0000 | [diff] [blame] | 55 | bool DumpCoverage = false; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 56 | bool DetectLeaks = true; |
Kostya Serebryany | a17d23e | 2016-10-13 19:06:46 +0000 | [diff] [blame] | 57 | int TraceMalloc = 0; |
Marcos Pividori | c59b692 | 2016-12-13 17:45:20 +0000 | [diff] [blame] | 58 | bool HandleAbrt = false; |
| 59 | bool HandleBus = false; |
| 60 | bool HandleFpe = false; |
| 61 | bool HandleIll = false; |
| 62 | bool HandleInt = false; |
| 63 | bool HandleSegv = false; |
| 64 | bool HandleTerm = false; |
Kostya Serebryany | 4aa0590 | 2017-01-05 22:05:47 +0000 | [diff] [blame^] | 65 | bool HandleXfsz = false; |
Kostya Serebryany | 556894f | 2016-09-21 02:05:39 +0000 | [diff] [blame] | 66 | }; |
| 67 | |
| 68 | } // namespace fuzzer |
| 69 | |
| 70 | #endif // LLVM_FUZZER_OPTIONS_H |