blob: 6f72205600b92a1305dc016127a618a547594a36 [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;
Kostya Serebryany2a8440d2016-12-27 23:24:55 +000022 bool ExperimentalLenControl = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000023 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 Serebryanya5f94fb2016-10-14 20:20:33 +000034 bool UseCmp = false;
Kostya Serebryanyab73c692016-09-23 00:46:18 +000035 bool UseValueProfile = false;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000036 bool Shrink = false;
Kostya Serebryany9adc7c82016-10-08 22:12:14 +000037 int ReloadIntervalSec = 1;
Kostya Serebryany556894f2016-09-21 02:05:39 +000038 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 Serebryany5ff481f2016-09-27 00:10:20 +000046 std::string ExitOnSrcPos;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000047 std::string ExitOnItem;
Kostya Serebryany556894f2016-09-21 02:05:39 +000048 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 Serebryany29bb6642016-09-21 22:42:17 +000053 bool PrintCorpusStats = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000054 bool PrintCoverage = false;
Mike Aizatsky9b415be2016-12-19 22:18:08 +000055 bool DumpCoverage = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000056 bool DetectLeaks = true;
Kostya Serebryanya17d23e2016-10-13 19:06:46 +000057 int TraceMalloc = 0;
Marcos Pividoric59b6922016-12-13 17:45:20 +000058 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 Serebryany4aa05902017-01-05 22:05:47 +000065 bool HandleXfsz = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000066};
67
68} // namespace fuzzer
69
70#endif // LLVM_FUZZER_OPTIONS_H