diff options
| author | Kostya Serebryany <kcc@google.com> | 2016-12-27 23:24:55 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2016-12-27 23:24:55 +0000 |
| commit | 2a8440df70fd59fb6c30444f74864a459bd18869 (patch) | |
| tree | 2069f8ad740fabcdf0225051c6f35a6ffd5cdc8b /llvm/lib/Fuzzer/FuzzerCorpus.h | |
| parent | aa54e501058361bef34613c6b3f1905ca48f741b (diff) | |
| download | bcm5719-llvm-2a8440df70fd59fb6c30444f74864a459bd18869.tar.gz bcm5719-llvm-2a8440df70fd59fb6c30444f74864a459bd18869.zip | |
[libFuzzer] add an experimental flag -experimental_len_control=1 that sets max_len to 1M and tries to increases the actual max sizes of mutations very gradually (second attempt)
llvm-svn: 290637
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerCorpus.h')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerCorpus.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerCorpus.h b/llvm/lib/Fuzzer/FuzzerCorpus.h index 663c5854b4c..42b3d2482fa 100644 --- a/llvm/lib/Fuzzer/FuzzerCorpus.h +++ b/llvm/lib/Fuzzer/FuzzerCorpus.h @@ -59,6 +59,12 @@ class InputCorpus { Res += !II->U.empty(); return Res; } + size_t MaxInputSize() const { + size_t Res = 0; + for (auto II : Inputs) + Res = std::max(Res, II->U.size()); + return Res; + } bool empty() const { return Inputs.empty(); } const Unit &operator[] (size_t Idx) const { return Inputs[Idx]->U; } void AddToCorpus(const Unit &U, size_t NumFeatures, bool MayDeleteFile = false) { |

