blob: b1366789be007b2d82d27af72c4eaa232f27001f [file] [log] [blame]
Kostya Serebryany556894f2016-09-21 02:05:39 +00001//
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
16namespace fuzzer {
17
18struct FuzzingOptions {
19 int Verbosity = 1;
20 size_t MaxLen = 0;
Kostya Serebryany2a8440d2016-12-27 23:24:55 +000021 bool ExperimentalLenControl = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000022 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;
Kostya Serebryany556894f2016-09-21 02:05:39 +000031 bool UseMemmem = true;
Kostya Serebryanya5f94fb2016-10-14 20:20:33 +000032 bool UseCmp = false;
Kostya Serebryanyab73c692016-09-23 00:46:18 +000033 bool UseValueProfile = false;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000034 bool Shrink = false;
Kostya Serebryany9adc7c82016-10-08 22:12:14 +000035 int ReloadIntervalSec = 1;
Kostya Serebryany556894f2016-09-21 02:05:39 +000036 bool ShuffleAtStartUp = true;
37 bool PreferSmall = true;
38 size_t MaxNumberOfRuns = -1L;
39 int ReportSlowUnits = 10;
40 bool OnlyASCII = false;
41 std::string OutputCorpus;
42 std::string ArtifactPrefix = "./";
43 std::string ExactArtifactPath;
Kostya Serebryany5ff481f2016-09-27 00:10:20 +000044 std::string ExitOnSrcPos;
Kostya Serebryanyd2169222016-10-01 01:04:29 +000045 std::string ExitOnItem;
Kostya Serebryany556894f2016-09-21 02:05:39 +000046 bool SaveArtifacts = true;
47 bool PrintNEW = true; // Print a status line when new units are found;
Kostya Serebryany556894f2016-09-21 02:05:39 +000048 bool PrintNewCovPcs = false;
49 bool PrintFinalStats = false;
Kostya Serebryany29bb6642016-09-21 22:42:17 +000050 bool PrintCorpusStats = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000051 bool PrintCoverage = false;
Mike Aizatsky9b415be2016-12-19 22:18:08 +000052 bool DumpCoverage = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000053 bool DetectLeaks = true;
Kostya Serebryanya17d23e2016-10-13 19:06:46 +000054 int TraceMalloc = 0;
Marcos Pividoric59b6922016-12-13 17:45:20 +000055 bool HandleAbrt = false;
56 bool HandleBus = false;
57 bool HandleFpe = false;
58 bool HandleIll = false;
59 bool HandleInt = false;
60 bool HandleSegv = false;
61 bool HandleTerm = false;
Kostya Serebryany4aa05902017-01-05 22:05:47 +000062 bool HandleXfsz = false;
Kostya Serebryany556894f2016-09-21 02:05:39 +000063};
64
65} // namespace fuzzer
66
67#endif // LLVM_FUZZER_OPTIONS_H