diff options
author | Kostya Serebryany <kcc@google.com> | 2019-02-08 01:20:54 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2019-02-08 01:20:54 +0000 |
commit | 0719b3527f5bc550d3677161ca49a0e6d462c9e1 (patch) | |
tree | 1d7883291a5e176f48a2366581f5ef0112dfbcb0 /compiler-rt/lib/fuzzer/FuzzerMutate.h | |
parent | 3189d5f48cae13f02a14a894f631dd5c23b0aeae (diff) | |
download | bcm5719-llvm-0719b3527f5bc550d3677161ca49a0e6d462c9e1.tar.gz bcm5719-llvm-0719b3527f5bc550d3677161ca49a0e6d462c9e1.zip |
[libFuzzer] refactor the way we choose the element to cross-over with, NFC (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs
llvm-svn: 353494
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerMutate.h')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerMutate.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerMutate.h b/compiler-rt/lib/fuzzer/FuzzerMutate.h index 33064d7a72b..6cbce802762 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMutate.h +++ b/compiler-rt/lib/fuzzer/FuzzerMutate.h @@ -63,7 +63,7 @@ public: /// Change a 1-, 2-, 4-, or 8-byte integer in interesting ways. size_t Mutate_ChangeBinaryInteger(uint8_t *Data, size_t Size, size_t MaxSize); - /// CrossOver Data with some other element of the corpus. + /// CrossOver Data with CrossOverWith. size_t Mutate_CrossOver(uint8_t *Data, size_t Size, size_t MaxSize); /// Applies one of the configured mutations. @@ -88,7 +88,7 @@ public: void PrintRecommendedDictionary(); - void SetCorpus(const InputCorpus *Corpus) { this->Corpus = Corpus; } + void SetCrossOverWith(const Unit *U) { CrossOverWith = U; } Random &GetRand() { return Rand; } @@ -139,7 +139,7 @@ public: DictionaryEntry CmpDictionaryEntriesDeque[kCmpDictionaryEntriesDequeSize]; size_t CmpDictionaryEntriesDequeIdx = 0; - const InputCorpus *Corpus = nullptr; + const Unit *CrossOverWith = nullptr; Vector<uint8_t> MutateInPlaceHere; Vector<uint8_t> MutateWithMaskTemp; // CustomCrossOver needs its own buffer as a custom implementation may call |