diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2017-08-27 23:20:09 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2017-08-27 23:20:09 +0000 |
commit | bebcbfb46dc7c89d32eb11254123211f87087dca (patch) | |
tree | ac7ca788e2445caf8b5ff0a60eab3f220a126975 /compiler-rt/lib/fuzzer/FuzzerMutate.cpp | |
parent | 41395022a32a29d8bab5af989a59af4cb83b1191 (diff) | |
download | bcm5719-llvm-bebcbfb46dc7c89d32eb11254123211f87087dca.tar.gz bcm5719-llvm-bebcbfb46dc7c89d32eb11254123211f87087dca.zip |
[libFuzzer] Use custom allocators for STL containers in libFuzzer.
Avoids ODR violations causing spurious ASAN warnings.
Differential Revision: https://reviews.llvm.org/D37086
llvm-svn: 311866
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerMutate.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerMutate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp index 5998ef9d319..9ee5299f1b6 100644 --- a/compiler-rt/lib/fuzzer/FuzzerMutate.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerMutate.cpp @@ -466,7 +466,7 @@ void MutationDispatcher::RecordSuccessfulMutationSequence() { } void MutationDispatcher::PrintRecommendedDictionary() { - std::vector<DictionaryEntry> V; + Vector<DictionaryEntry> V; for (auto &DE : PersistentAutoDictionary) if (!ManualDictionary.ContainsWord(DE.GetW())) V.push_back(DE); @@ -506,7 +506,7 @@ size_t MutationDispatcher::DefaultMutate(uint8_t *Data, size_t Size, // Mutates Data in place, returns new size. size_t MutationDispatcher::MutateImpl(uint8_t *Data, size_t Size, size_t MaxSize, - const std::vector<Mutator> &Mutators) { + Vector<Mutator> &Mutators) { assert(MaxSize > 0); // Some mutations may fail (e.g. can't insert more bytes if Size == MaxSize), // in which case they will return 0. |