2017-08-22 07:25:50 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// fuzzer::FuzzingOptions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_FUZZER_OPTIONS_H
|
|
|
|
#define LLVM_FUZZER_OPTIONS_H
|
|
|
|
|
|
|
|
#include "FuzzerDefs.h"
|
|
|
|
|
|
|
|
namespace fuzzer {
|
|
|
|
|
|
|
|
struct FuzzingOptions {
|
|
|
|
int Verbosity = 1;
|
|
|
|
size_t MaxLen = 0;
|
2018-02-14 04:52:15 +08:00
|
|
|
size_t LenControl = 1000;
|
2017-08-22 07:25:50 +08:00
|
|
|
int UnitTimeoutSec = 300;
|
|
|
|
int TimeoutExitCode = 77;
|
|
|
|
int ErrorExitCode = 77;
|
|
|
|
int MaxTotalTimeSec = 0;
|
|
|
|
int RssLimitMb = 0;
|
2017-12-02 06:12:04 +08:00
|
|
|
int MallocLimitMb = 0;
|
2017-08-22 07:25:50 +08:00
|
|
|
bool DoCrossOver = true;
|
|
|
|
int MutateDepth = 5;
|
2017-12-02 03:18:38 +08:00
|
|
|
bool ReduceDepth = false;
|
2017-08-22 07:25:50 +08:00
|
|
|
bool UseCounters = false;
|
|
|
|
bool UseMemmem = true;
|
|
|
|
bool UseCmp = false;
|
|
|
|
bool UseValueProfile = false;
|
|
|
|
bool Shrink = false;
|
|
|
|
bool ReduceInputs = false;
|
|
|
|
int ReloadIntervalSec = 1;
|
|
|
|
bool ShuffleAtStartUp = true;
|
|
|
|
bool PreferSmall = true;
|
|
|
|
size_t MaxNumberOfRuns = -1L;
|
|
|
|
int ReportSlowUnits = 10;
|
|
|
|
bool OnlyASCII = false;
|
|
|
|
std::string OutputCorpus;
|
|
|
|
std::string ArtifactPrefix = "./";
|
|
|
|
std::string ExactArtifactPath;
|
|
|
|
std::string ExitOnSrcPos;
|
|
|
|
std::string ExitOnItem;
|
2018-05-17 07:26:37 +08:00
|
|
|
std::string FocusFunction;
|
2017-08-22 07:25:50 +08:00
|
|
|
bool SaveArtifacts = true;
|
|
|
|
bool PrintNEW = true; // Print a status line when new units are found;
|
|
|
|
bool PrintNewCovPcs = false;
|
2017-08-29 06:52:22 +08:00
|
|
|
int PrintNewCovFuncs = 0;
|
2017-08-22 07:25:50 +08:00
|
|
|
bool PrintFinalStats = false;
|
|
|
|
bool PrintCorpusStats = false;
|
|
|
|
bool PrintCoverage = false;
|
2018-05-22 03:47:00 +08:00
|
|
|
bool DumpCoverage = false;
|
2017-08-22 07:25:50 +08:00
|
|
|
bool DetectLeaks = true;
|
2017-10-24 06:04:30 +08:00
|
|
|
int PurgeAllocatorIntervalSec = 1;
|
2017-10-11 09:44:26 +08:00
|
|
|
int UseFeatureFrequency = false;
|
2017-08-22 07:25:50 +08:00
|
|
|
int TraceMalloc = 0;
|
|
|
|
bool HandleAbrt = false;
|
|
|
|
bool HandleBus = false;
|
|
|
|
bool HandleFpe = false;
|
|
|
|
bool HandleIll = false;
|
|
|
|
bool HandleInt = false;
|
|
|
|
bool HandleSegv = false;
|
|
|
|
bool HandleTerm = false;
|
|
|
|
bool HandleXfsz = false;
|
2017-11-10 04:30:19 +08:00
|
|
|
bool HandleUsr1 = false;
|
|
|
|
bool HandleUsr2 = false;
|
2017-08-22 07:25:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace fuzzer
|
|
|
|
|
|
|
|
#endif // LLVM_FUZZER_OPTIONS_H
|