diff options
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInternal.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerInternal.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInternal.h b/llvm/lib/Fuzzer/FuzzerInternal.h index 0fa0b90b803..7cb78fd91ee 100644 --- a/llvm/lib/Fuzzer/FuzzerInternal.h +++ b/llvm/lib/Fuzzer/FuzzerInternal.h @@ -43,7 +43,7 @@ void PrintASCII(const Unit &U, const char *PrintAfter = ""); std::string Hash(const Unit &U); void SetTimer(int Seconds); void PrintFileAsBase64(const std::string &Path); -void ExecuteCommand(const std::string &Command); +int ExecuteCommand(const std::string &Command); // Private copy of SHA1 implementation. static const int kSHA1NumBytes = 20; @@ -94,13 +94,15 @@ class Fuzzer { std::string OutputCorpus; std::string SyncCommand; std::string ArtifactPrefix = "./"; - std::vector<Unit> Dictionary; bool SaveArtifacts = true; + bool PrintNEW = true; // Print a status line when new units are found; }; Fuzzer(UserSuppliedFuzzer &USF, FuzzingOptions Options); void AddToCorpus(const Unit &U) { Corpus.push_back(U); } - size_t ChooseUnitToMutate(); + size_t ChooseUnitIdxToMutate(); + const Unit &ChooseUnitToMutate() { return Corpus[ChooseUnitIdxToMutate()]; }; void Loop(); + void Drill(); void ShuffleAndMinimize(); void InitializeTraceState(); size_t CorpusSize() const { return Corpus.size(); } @@ -135,6 +137,7 @@ class Fuzzer { void WriteToOutputCorpus(const Unit &U); void WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix); void PrintStats(const char *Where, const char *End = "\n"); + void PrintStatusForNewUnit(const Unit &U); void PrintUnitInASCII(const Unit &U, const char *PrintAfter = ""); void SyncCorpus(); |