• Home
  • Raw
  • Download

Lines Matching refs:Options

62   static void ResetCounters(const FuzzingOptions &Options) {  in ResetCounters()
63 if (Options.UseCounters) { in ResetCounters()
68 static void Prepare(const FuzzingOptions &Options, Fuzzer::Coverage *C) { in Prepare()
69 if (Options.UseCounters) { in Prepare()
77 static bool RecordMax(const FuzzingOptions &Options, Fuzzer::Coverage *C) { in RecordMax()
86 if (Options.UseIndirCalls && in RecordMax()
96 if (Options.UseCounters) { in RecordMax()
146 Fuzzer::Fuzzer(UserCallback CB, MutationDispatcher &MD, FuzzingOptions Options) in Fuzzer() argument
147 : CB(CB), MD(MD), Options(Options) { in Fuzzer()
154 if (Options.DetectLeaks && EF->__sanitizer_install_malloc_and_free_hooks) in Fuzzer()
159 if (CurrentUnitData || Options.MaxLen == 0) return; in LazyAllocateCurrentUnitData()
160 CurrentUnitData = new uint8_t[Options.MaxLen]; in LazyAllocateCurrentUnitData()
215 exit(Options.ErrorExitCode); in CrashCallback()
226 assert(Options.UnitTimeoutSec > 0); in AlarmCallback()
234 if (Options.Verbosity >= 2) in AlarmCallback()
236 if (Seconds >= (size_t)Options.UnitTimeoutSec) { in AlarmCallback()
239 Options.UnitTimeoutSec); in AlarmCallback()
247 _Exit(Options.TimeoutExitCode); // Stop right now. in AlarmCallback()
254 GetPid(), GetPeakRSSMb(), Options.RssLimitMb); in RssLimitCallback()
261 _Exit(Options.ErrorExitCode); // Stop right now. in RssLimitCallback()
266 if (Options.OutputCSV) { in PrintStats()
277 if (!Options.Verbosity) in PrintStats()
293 if (!Options.PrintFinalStats) return; in PrintFinalStats()
310 assert(Options.MaxLen == 0); // Can only reset MaxLen from 0 to non-0. in SetMaxLen()
312 Options.MaxLen = MaxLen; in SetMaxLen()
313 Printf("INFO: -max_len is not provided, using %zd\n", Options.MaxLen); in SetMaxLen()
318 if (Options.OutputCorpus.empty()) in RereadOutputCorpus()
321 ReadDirToVectorOfUnits(Options.OutputCorpus.c_str(), &AdditionalCorpus, in RereadOutputCorpus()
327 if (!Options.Reload) in RereadOutputCorpus()
329 if (Options.Verbosity >= 2) in RereadOutputCorpus()
346 if (Options.PreferSmall) in ShuffleCorpus()
374 if (Options.ShuffleAtStartUp) in ShuffleAndMinimize()
377 if (Options.TruncateUnits) { in ShuffleAndMinimize()
385 if (!Options.PruneCorpus || NewCoverage) { in ShuffleAndMinimize()
387 if (Options.Verbosity >= 2) in ShuffleAndMinimize()
407 bool Res = CoverageController::RecordMax(Options, &MaxCoverage); in UpdateMaxCoverage()
409 if (Options.PrintNewCovPcs && PrevBufferLen != MaxCoverage.PcBufferLen) { in UpdateMaxCoverage()
425 CoverageController::ResetCounters(Options); in RunOne()
436 TimeOfUnit >= Options.ReportSlowUnits) { in RunOne()
445 if (TotalNumberOfRuns >= Options.MaxNumberOfRuns) in RunOneAndUpdateCorpus()
488 if (Options.OnlyASCII) in WriteToOutputCorpus()
490 if (Options.OutputCorpus.empty()) in WriteToOutputCorpus()
492 std::string Path = DirPlusFile(Options.OutputCorpus, Hash(U)); in WriteToOutputCorpus()
494 if (Options.Verbosity >= 2) in WriteToOutputCorpus()
499 if (!Options.SaveArtifacts) in WriteUnitToFileWithPrefix()
501 std::string Path = Options.ArtifactPrefix + Prefix + Hash(U); in WriteUnitToFileWithPrefix()
502 if (!Options.ExactArtifactPath.empty()) in WriteUnitToFileWithPrefix()
503 Path = Options.ExactArtifactPath; // Overrides ArtifactPrefix. in WriteUnitToFileWithPrefix()
506 Options.ArtifactPrefix.c_str(), Path.c_str()); in WriteUnitToFileWithPrefix()
512 if (Options.OutputCorpus.empty()) in SaveCorpus()
515 WriteToFile(U, DirPlusFile(Options.OutputCorpus, Hash(U))); in SaveCorpus()
516 if (Options.Verbosity) in SaveCorpus()
518 Options.OutputCorpus.c_str()); in SaveCorpus()
522 if (!Options.PrintNEW) in PrintStatusForNewUnit()
525 if (Options.Verbosity) { in PrintStatusForNewUnit()
584 assert(Options.MaxLen > 0); in Merge()
586 ReadDirToVectorOfUnits(Corpora[0].c_str(), &Initial, nullptr, Options.MaxLen); in Merge()
588 ReadDirToVectorOfUnits(C.c_str(), &Extra, nullptr, Options.MaxLen); in Merge()
609 if (!Options.DetectLeaks) return; in TryDetectingAMemoryLeak()
620 Options.DetectLeaks = false; in TryDetectingAMemoryLeak()
637 _Exit(Options.ErrorExitCode); // not exit() to disable lsan further on. in TryDetectingAMemoryLeak()
648 assert(Size <= Options.MaxLen && "Oversized Unit"); in MutateAndTestOne()
651 for (int i = 0; i < Options.MutateDepth; i++) { in MutateAndTestOne()
653 NewSize = MD.Mutate(CurrentUnitData, Size, Options.MaxLen); in MutateAndTestOne()
655 assert(NewSize <= Options.MaxLen && in MutateAndTestOne()
680 CoverageController::Prepare(Options, &MaxCoverage); in ResetCoverage()
693 Options.PrintNEW = false; // Don't print NEW status lines when drilling. in Drill()
707 SavedOutputCorpusPath.swap(Options.OutputCorpus); in Drill()
713 SavedOutputCorpusPath.swap(Options.OutputCorpus); in Drill()
717 Options.PrintNEW = true; in Drill()
727 if (NumMerged && Options.Verbosity) in Drill()
733 if (Options.DoCrossOver) in Loop()
738 RereadOutputCorpus(Options.MaxLen); in Loop()
741 if (TotalNumberOfRuns >= Options.MaxNumberOfRuns) in Loop()
743 if (Options.MaxTotalTimeSec > 0 && in Loop()
745 static_cast<size_t>(Options.MaxTotalTimeSec)) in Loop()