diff options
author | Kostya Serebryany <kcc@google.com> | 2015-05-07 21:02:11 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2015-05-07 21:02:11 +0000 |
commit | beb24c38e7927211cbb377053d5436cf1f5bb001 (patch) | |
tree | 2ac53f2e553d244f35afae0d242878a78f2faabe /llvm/lib/Fuzzer/FuzzerInternal.h | |
parent | 4878c87d5ea9fbe40c465f8b9cee01a6e333be88 (diff) | |
download | bcm5719-llvm-beb24c38e7927211cbb377053d5436cf1f5bb001.tar.gz bcm5719-llvm-beb24c38e7927211cbb377053d5436cf1f5bb001.zip |
[lib/Fuzzer] change the way we use taint information for fuzzing. Now, we run a single unit and collect suggested mutations based on tracing+taint data, then apply the suggested mutations one by one. The previous scheme was slower and more complex.
llvm-svn: 236772
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInternal.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerInternal.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInternal.h b/llvm/lib/Fuzzer/FuzzerInternal.h index 6fd3bfe799c..0fead355531 100644 --- a/llvm/lib/Fuzzer/FuzzerInternal.h +++ b/llvm/lib/Fuzzer/FuzzerInternal.h @@ -94,10 +94,20 @@ class Fuzzer { size_t RunOneMaximizeCoveragePairs(const Unit &U); void WriteToOutputCorpus(const Unit &U); void WriteToCrash(const Unit &U, const char *Prefix); - bool MutateWithDFSan(Unit *U); void PrintStats(const char *Where, size_t Cov, const char *End = "\n"); void PrintUnitInASCIIOrTokens(const Unit &U, const char *PrintAfter = ""); + // 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. + + // Start tracing; forget all previously proposed mutations. + void StartTraceRecording(); + // Stop tracing and return the number of proposed mutations. + size_t StopTraceRecording(); + // Apply Idx-th trace-based mutation to U. + void ApplyTraceBasedMutation(size_t Idx, Unit *U); + void SetDeathCallback(); static void StaticDeathCallback(); void DeathCallback(); |