Home | History | Annotate | Line # | 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   size_t LenControl = 1000;
     22   int UnitTimeoutSec = 300;
     23   int TimeoutExitCode = 77;
     24   int ErrorExitCode = 77;
     25   int MaxTotalTimeSec = 0;
     26   int RssLimitMb = 0;
     27   int MallocLimitMb = 0;
     28   bool DoCrossOver = true;
     29   int MutateDepth = 5;
     30   bool ReduceDepth = false;
     31   bool UseCounters = false;
     32   bool UseMemmem = true;
     33   bool UseCmp = false;
     34   int UseValueProfile = false;
     35   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;
     48   std::string FocusFunction;
     49   std::string DataFlowTrace;
     50   bool SaveArtifacts = true;
     51   bool PrintNEW = true; // Print a status line when new units are found;
     52   bool PrintNewCovPcs = false;
     53   int PrintNewCovFuncs = 0;
     54   bool PrintFinalStats = false;
     55   bool PrintCorpusStats = false;
     56   bool PrintCoverage = false;
     57   bool PrintUnstableStats = false;
     58   int HandleUnstable = 0;
     59   bool DumpCoverage = false;
     60   bool DetectLeaks = true;
     61   int PurgeAllocatorIntervalSec = 1;
     62   int  TraceMalloc = 0;
     63   bool HandleAbrt = false;
     64   bool HandleBus = false;
     65   bool HandleFpe = false;
     66   bool HandleIll = false;
     67   bool HandleInt = false;
     68   bool HandleSegv = false;
     69   bool HandleTerm = false;
     70   bool HandleXfsz = false;
     71   bool HandleUsr1 = false;
     72   bool HandleUsr2 = false;
     73 };
     74 
     75 }  // namespace fuzzer
     76 
     77 #endif  // LLVM_FUZZER_OPTIONS_H
     78