Home | History | Annotate | Download | only in Fuzzer
      1 //
      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 
     16 namespace fuzzer {
     17 
     18 struct FuzzingOptions {
     19   int Verbosity = 1;
     20   size_t MaxLen = 0;
     21   bool ExperimentalLenControl = false;
     22   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;
     31   bool UseMemmem = true;
     32   bool UseCmp = false;
     33   bool UseValueProfile = false;
     34   bool Shrink = false;
     35   int ReloadIntervalSec = 1;
     36   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;
     44   std::string ExitOnSrcPos;
     45   std::string ExitOnItem;
     46   bool SaveArtifacts = true;
     47   bool PrintNEW = true; // Print a status line when new units are found;
     48   bool OutputCSV = false;
     49   bool PrintNewCovPcs = false;
     50   bool PrintFinalStats = false;
     51   bool PrintCorpusStats = false;
     52   bool PrintCoverage = false;
     53   bool DumpCoverage = false;
     54   bool DetectLeaks = true;
     55   int  TraceMalloc = 0;
     56   bool HandleAbrt = false;
     57   bool HandleBus = false;
     58   bool HandleFpe = false;
     59   bool HandleIll = false;
     60   bool HandleInt = false;
     61   bool HandleSegv = false;
     62   bool HandleTerm = false;
     63   bool HandleXfsz = false;
     64 };
     65 
     66 }  // namespace fuzzer
     67 
     68 #endif  // LLVM_FUZZER_OPTIONS_H
     69