blob: ce39c0876cd72df423a592b423c611f286440114 [file] [log] [blame]
George Karpenkov10ab2ac2017-08-21 23:25:50 +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;
Matt Morehouse36c89b32018-02-13 20:52:15 +000021 size_t LenControl = 1000;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000022 int UnitTimeoutSec = 300;
23 int TimeoutExitCode = 77;
24 int ErrorExitCode = 77;
25 int MaxTotalTimeSec = 0;
26 int RssLimitMb = 0;
Kostya Serebryanyde9bafb2017-12-01 22:12:04 +000027 int MallocLimitMb = 0;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000028 bool DoCrossOver = true;
29 int MutateDepth = 5;
Kostya Serebryanyad05ee02017-12-01 19:18:38 +000030 bool ReduceDepth = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000031 bool UseCounters = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000032 bool UseMemmem = true;
33 bool UseCmp = false;
Kostya Serebryany51ddb882018-07-03 22:33:09 +000034 int UseValueProfile = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000035 bool Shrink = false;
36 bool ReduceInputs = false;
37 int ReloadIntervalSec = 1;
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;
46 std::string ExitOnSrcPos;
47 std::string ExitOnItem;
Kostya Serebryanye9c6f062018-05-16 23:26:37 +000048 std::string FocusFunction;
Kostya Serebryany1fd005f2018-06-06 01:23:29 +000049 std::string DataFlowTrace;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000050 bool SaveArtifacts = true;
51 bool PrintNEW = true; // Print a status line when new units are found;
52 bool PrintNewCovPcs = false;
Kostya Serebryanyc0700862017-08-28 22:52:22 +000053 int PrintNewCovFuncs = 0;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000054 bool PrintFinalStats = false;
Max Moroz061b4af2018-07-17 20:37:40 +000055 bool PrintMutationStats = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000056 bool PrintCorpusStats = false;
57 bool PrintCoverage = false;
Max Moroz08dad542018-07-16 16:01:31 +000058 bool PrintUnstableStats = false;
Max Moroz1e954f72018-07-23 14:20:52 +000059 int HandleUnstable = 0;
Kostya Serebryany69c2b712018-05-21 19:47:00 +000060 bool DumpCoverage = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000061 bool DetectLeaks = true;
Alex Shlyapnikov6f1c26f2017-10-23 22:04:30 +000062 int PurgeAllocatorIntervalSec = 1;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000063 int TraceMalloc = 0;
64 bool HandleAbrt = false;
65 bool HandleBus = false;
66 bool HandleFpe = false;
67 bool HandleIll = false;
68 bool HandleInt = false;
69 bool HandleSegv = false;
70 bool HandleTerm = false;
71 bool HandleXfsz = false;
Kostya Serebryanya2ca2dc2017-11-09 20:30:19 +000072 bool HandleUsr1 = false;
73 bool HandleUsr2 = false;
George Karpenkov10ab2ac2017-08-21 23:25:50 +000074};
75
76} // namespace fuzzer
77
78#endif // LLVM_FUZZER_OPTIONS_H