blob: 59126a231e3c6824f4631039d9bcd28ed069d915 [file] [log] [blame]
Kostya Serebryany556894f2016-09-21 02:05:39 +00001//===- 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
17namespace fuzzer {
18
19struct FuzzingOptions {
20 int Verbosity = 1;
21 size_t MaxLen = 0;
22 int UnitTimeoutSec = 300;
23 int TimeoutExitCode = 77;
24 int ErrorExitCode = 77;
25 int MaxTotalTimeSec = 0;
26 int RssLimitMb = 0;
27 bool DoCrossOver = true;
28 int MutateDepth = 5;
29 bool UseCounters = false;
30 bool UseIndirCalls = true;
31 bool UseMemcmp = true;
32 bool UseMemmem = true;
Kostya Serebryanya5f94fb2016-10-14 20:20:33 +000033 bool UseCmp = false;
Kostya Serebryanyab73c692016-09-23 00:46:18 +000034 bool UseValueProfile = false;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000035 bool Shrink = false;
Kostya Serebryany9adc7c82016-10-08 22:12:14 +000036 int ReloadIntervalSec = 1;
Kostya Serebryany556894f2016-09-21 02:05:39 +000037 bool ShuffleAtStartUp = true;
38 bool PreferSmall = true;
39 size_t MaxNumberOfRuns = -1L;
40 int ReportSlowUnits = 10;
41 bool OnlyASCII = false;
42 std::string OutputCorpus;
43 std::string ArtifactPrefix = "./";
44 std::string ExactArtifactPath;
Kostya Serebryany5ff481f2016-09-27 00:10:20 +000045 std::string ExitOnSrcPos;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000046 std::string ExitOnItem;
Kostya Serebryany556894f2016-09-21 02:05:39 +000047 bool SaveArtifacts = true;
48 bool PrintNEW = true; // Print a status line when new units are found;
49 bool OutputCSV = false;
50 bool PrintNewCovPcs = false;
51 bool PrintFinalStats = false;
Kostya Serebryany29bb6642016-09-21 22:42:17 +000052 bool PrintCorpusStats = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000053 bool PrintCoverage = false;
54 bool DetectLeaks = true;
Kostya Serebryanya17d23e2016-10-13 19:06:46 +000055 int TraceMalloc = 0;
Kostya Serebryany556894f2016-09-21 02:05:39 +000056};
57
58} // namespace fuzzer
59
60#endif // LLVM_FUZZER_OPTIONS_H