Lines Matching defs:Options
126 if (!Options.MallocLimitMb || (Size >> 20) < (size_t)Options.MallocLimitMb)
135 _Exit(Options.OOMExitCode); // Stop right now.
139 FuzzingOptions Options)
140 : CB(CB), Corpus(Corpus), MD(MD), Options(Options) {
147 if (Options.DetectLeaks && EF->__sanitizer_install_malloc_and_free_hooks)
149 TPC.SetUseCounters(Options.UseCounters);
150 TPC.SetUseValueProfileMask(Options.UseValueProfile);
152 if (Options.Verbosity)
154 if (!Options.OutputCorpus.empty() && Options.ReloadIntervalSec)
155 EpochOfLastReadOfOutputCorpus = GetEpoch(Options.OutputCorpus);
156 MaxInputLen = MaxMutationLen = Options.MaxLen;
240 _Exit(Options.ErrorExitCode); // Stop right now.
254 _Exit(Options.ErrorExitCode);
271 _Exit(Options.InterruptExitCode);
276 assert(Options.UnitTimeoutSec > 0);
289 if (Options.Verbosity >= 2)
291 if (Seconds >= (size_t)Options.UnitTimeoutSec) {
297 Options.UnitTimeoutSec);
304 _Exit(Options.TimeoutExitCode); // Stop right now.
314 GetPid(), GetPeakRSSMb(), Options.RssLimitMb);
320 _Exit(Options.OOMExitCode); // Stop right now.
326 if (!Options.Verbosity)
357 if (Options.PrintCoverage)
359 if (Options.PrintCorpusStats)
361 if (!Options.PrintFinalStats)
388 if (!Options.ExitOnSrcPos.empty()) {
394 if (Descr.find(Options.ExitOnSrcPos) != std::string::npos) {
396 Options.ExitOnSrcPos.c_str());
402 if (!Options.ExitOnItem.empty()) {
403 if (Corpus.HasUnit(Options.ExitOnItem)) {
405 Options.ExitOnItem.c_str());
412 if (Options.OutputCorpus.empty() || !Options.ReloadIntervalSec)
415 ReadDirToVectorOfUnits(Options.OutputCorpus.c_str(), &AdditionalCorpus,
418 if (Options.Verbosity >= 2)
442 TimeOfUnit >= Options.ReportSlowUnits) {
477 if (Corpus.AddFeature(Feature, Size, Options.Shrink))
479 if (Options.Entropic)
481 if (Options.ReduceInputs && II)
495 WriteFeatureSetToFile(Options.FeaturesDir, Sha1ToString(NewII->Sha1),
505 RenameFeatureSetFile(Options.FeaturesDir, OldFeaturesFile,
525 _Exit(Options.ErrorExitCode); // Stop right now.
555 AllocTracer.Start(Options.TraceMalloc);
573 if (Options.OnlyASCII)
575 if (Options.OutputCorpus.empty())
577 std::string Path = DirPlusFile(Options.OutputCorpus, Hash(U));
579 if (Options.Verbosity >= 2)
585 if (!Options.SaveArtifacts)
587 std::string Path = Options.ArtifactPrefix + Prefix + Hash(U);
588 if (!Options.ExactArtifactPath.empty())
589 Path = Options.ExactArtifactPath; // Overrides ArtifactPrefix.
592 Options.ArtifactPrefix.c_str(), Path.c_str());
598 if (!Options.PrintNEW)
601 if (Options.Verbosity) {
624 if (!Options.DetectLeaks)
627 TotalNumberOfRuns >= Options.MaxNumberOfRuns)
640 Options.DetectLeaks = false;
659 _Exit(Options.ErrorExitCode); // not exit() to disable lsan further on.
667 if (Options.DoCrossOver)
682 for (int i = 0; i < Options.MutateDepth; i++) {
683 if (TotalNumberOfRuns >= Options.MaxNumberOfRuns)
710 if (Options.ReduceDepth && !FoundUniqFeatures)
718 if (Options.PurgeAllocatorIntervalSec < 0 || !EF->__sanitizer_purge_allocator)
722 .count() < Options.PurgeAllocatorIntervalSec)
725 if (Options.RssLimitMb <= 0 ||
726 GetPeakRSSMb() > static_cast<size_t>(Options.RssLimitMb) / 2)
743 if (Options.MaxLen == 0)
759 if (Options.ShuffleAtStartUp)
762 if (Options.PreferSmall) {
779 if (!Options.FocusFunction.empty()) {
782 if (!Options.DataFlowTrace.empty())
788 if (Corpus.empty() && Options.MaxNumberOfRuns) {
796 auto FocusFunctionOrAuto = Options.FocusFunction;
797 DFT.Init(Options.DataFlowTrace, &FocusFunctionOrAuto, CorporaFiles,
802 TPC.SetPrintNewPCs(Options.PrintNewCovPcs);
803 TPC.SetPrintNewFuncs(Options.PrintNewCovFuncs);
811 if (!Options.StopFile.empty() &&
812 !FileToVector(Options.StopFile, 1, false).empty())
815 Options.ReloadIntervalSec) {
819 if (TotalNumberOfRuns >= Options.MaxNumberOfRuns)
825 if (Options.LenControl) {
828 Options.LenControl * Log(TmpMaxMutationLen)) {
850 while (!TimedOut() && TotalNumberOfRuns < Options.MaxNumberOfRuns) {
853 for (int i = 0; i < Options.MutateDepth; i++) {