diff options
author | Kostya Serebryany <kcc@google.com> | 2017-03-22 20:32:44 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2017-03-22 20:32:44 +0000 |
commit | 4fc6dd7f8fdd9e5d61f1cfe32afae038c0a8988f (patch) | |
tree | ca9aa9e03c351a2aa610237da827252e17a379fa /llvm/lib/Fuzzer/FuzzerMerge.h | |
parent | 6b2c9ac8885c62500efbe6013936d83bee7fae8f (diff) | |
download | bcm5719-llvm-4fc6dd7f8fdd9e5d61f1cfe32afae038c0a8988f.tar.gz bcm5719-llvm-4fc6dd7f8fdd9e5d61f1cfe32afae038c0a8988f.zip |
[libFuzzer] add two experimental flags to make corpus merging more scalable: -save_coverage_summary/-load_coverage_summary. This is still WIP, the documentation will come later if these flags survive
llvm-svn: 298548
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerMerge.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerMerge.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMerge.h b/llvm/lib/Fuzzer/FuzzerMerge.h index 4cef9c47bb1..cf4a0863571 100644 --- a/llvm/lib/Fuzzer/FuzzerMerge.h +++ b/llvm/lib/Fuzzer/FuzzerMerge.h @@ -43,6 +43,9 @@ #include "FuzzerDefs.h" #include <istream> +#include <ostream> +#include <set> +#include <vector> namespace fuzzer { @@ -61,8 +64,15 @@ struct Merger { bool Parse(std::istream &IS, bool ParseCoverage); bool Parse(const std::string &Str, bool ParseCoverage); void ParseOrExit(std::istream &IS, bool ParseCoverage); - size_t Merge(std::vector<std::string> *NewFiles); + void PrintSummary(std::ostream &OS); + std::set<uint32_t> ParseSummary(std::istream &IS); + size_t Merge(const std::set<uint32_t> &InitialFeatures, + std::vector<std::string> *NewFiles); + size_t Merge(std::vector<std::string> *NewFiles) { + return Merge({}, NewFiles); + } size_t ApproximateMemoryConsumption() const; + std::set<uint32_t> AllFeatures() const; }; } // namespace fuzzer |