blob: d48439daaf4d070f29836fd68f176d2b4c7f61ae [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//
chandlerc40284492019-01-19 08:50:56 +00002// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3// See https://llvm.org/LICENSE.txt for license information.
4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
george.karpenkov29efa6d2017-08-21 23:25:50 +00005//
6//===----------------------------------------------------------------------===//
7// fuzzer::FuzzingOptions
8//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_FUZZER_OPTIONS_H
11#define LLVM_FUZZER_OPTIONS_H
12
13#include "FuzzerDefs.h"
14
15namespace fuzzer {
16
17struct FuzzingOptions {
18 int Verbosity = 1;
19 size_t MaxLen = 0;
morehouse8c42ada2018-02-13 20:52:15 +000020 size_t LenControl = 1000;
george.karpenkov29efa6d2017-08-21 23:25:50 +000021 int UnitTimeoutSec = 300;
kcc4b5aa122019-02-09 00:16:21 +000022 int TimeoutExitCode = 70;
23 int OOMExitCode = 71;
24 int InterruptExitCode = 72;
george.karpenkov29efa6d2017-08-21 23:25:50 +000025 int ErrorExitCode = 77;
kcc55e54ed2019-02-15 21:51:15 +000026 bool IgnoreTimeouts = true;
27 bool IgnoreOOMs = true;
28 bool IgnoreCrashes = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000029 int MaxTotalTimeSec = 0;
30 int RssLimitMb = 0;
kcc120e40b2017-12-01 22:12:04 +000031 int MallocLimitMb = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000032 bool DoCrossOver = true;
33 int MutateDepth = 5;
kccb6836be2017-12-01 19:18:38 +000034 bool ReduceDepth = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000035 bool UseCounters = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000036 bool UseMemmem = true;
37 bool UseCmp = false;
kcc3850d062018-07-03 22:33:09 +000038 int UseValueProfile = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000039 bool Shrink = false;
40 bool ReduceInputs = false;
41 int ReloadIntervalSec = 1;
42 bool ShuffleAtStartUp = true;
43 bool PreferSmall = true;
44 size_t MaxNumberOfRuns = -1L;
45 int ReportSlowUnits = 10;
46 bool OnlyASCII = false;
47 std::string OutputCorpus;
48 std::string ArtifactPrefix = "./";
49 std::string ExactArtifactPath;
50 std::string ExitOnSrcPos;
51 std::string ExitOnItem;
kcc3acbe072018-05-16 23:26:37 +000052 std::string FocusFunction;
kcc86e43882018-06-06 01:23:29 +000053 std::string DataFlowTrace;
kcc6f1e9bc2019-04-13 00:20:31 +000054 std::string FeaturesDir;
george.karpenkov29efa6d2017-08-21 23:25:50 +000055 bool SaveArtifacts = true;
56 bool PrintNEW = true; // Print a status line when new units are found;
57 bool PrintNewCovPcs = false;
kccec9da662017-08-28 22:52:22 +000058 int PrintNewCovFuncs = 0;
george.karpenkov29efa6d2017-08-21 23:25:50 +000059 bool PrintFinalStats = false;
60 bool PrintCorpusStats = false;
61 bool PrintCoverage = false;
kcca7dd2a92018-05-21 19:47:00 +000062 bool DumpCoverage = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000063 bool DetectLeaks = true;
alekseyshld995b552017-10-23 22:04:30 +000064 int PurgeAllocatorIntervalSec = 1;
george.karpenkov29efa6d2017-08-21 23:25:50 +000065 int TraceMalloc = 0;
66 bool HandleAbrt = false;
67 bool HandleBus = false;
68 bool HandleFpe = false;
69 bool HandleIll = false;
70 bool HandleInt = false;
71 bool HandleSegv = false;
72 bool HandleTerm = false;
73 bool HandleXfsz = false;
kcc1239a992017-11-09 20:30:19 +000074 bool HandleUsr1 = false;
75 bool HandleUsr2 = false;
kccda168932019-01-31 00:09:43 +000076 bool LazyCounters = false;
george.karpenkov29efa6d2017-08-21 23:25:50 +000077};
78
79} // namespace fuzzer
80
81#endif // LLVM_FUZZER_OPTIONS_H