summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerInternal.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInternal.h')
-rw-r--r--llvm/lib/Fuzzer/FuzzerInternal.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInternal.h b/llvm/lib/Fuzzer/FuzzerInternal.h
index a57cd113553..85f86158373 100644
--- a/llvm/lib/Fuzzer/FuzzerInternal.h
+++ b/llvm/lib/Fuzzer/FuzzerInternal.h
@@ -123,11 +123,9 @@ class Fuzzer {
private:
void AlarmCallback();
void MutateAndTestOne(Unit *U);
- void ReportNewCoverage(size_t NewCoverage, const Unit &U);
- size_t RunOne(const Unit &U);
+ void ReportNewCoverage(const Unit &U);
+ bool RunOne(const Unit &U);
void RunOneAndUpdateCorpus(Unit &U);
- size_t RunOneMaximizeTotalCoverage(const Unit &U);
- size_t RunOneMaximizeCoveragePairs(const Unit &U);
void WriteToOutputCorpus(const Unit &U);
void WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix);
void PrintStats(const char *Where, size_t Cov, const char *End = "\n");
@@ -135,6 +133,11 @@ class Fuzzer {
void SyncCorpus();
+ size_t RecordBlockCoverage();
+ void PrepareCoverageBeforeRun();
+ bool CheckCoverageAfterRun();
+
+
// Trace-based fuzzing: we run a unit with some kind of tracing
// enabled and record potentially useful mutations. Then
// We apply these mutations one by one to the unit and run it again.
@@ -172,6 +175,7 @@ class Fuzzer {
system_clock::time_point UnitStartTime;
long TimeOfLongestUnitInSeconds = 0;
long EpochOfLastReadOfOutputCorpus = 0;
+ size_t LastRecordedBlockCoverage = 0;
};
class SimpleUserSuppliedFuzzer: public UserSuppliedFuzzer {
OpenPOWER on IntegriCloud