Debian Codegraph @

tools/fuzzing/libfuzzer/patches/14-explicit-allocator.patch

raw
1 # HG changeset patch
2 # User Christian Holler <[email protected]>
3 # Date 1596126981 -7200
4 # Thu Jul 30 18:36:21 2020 +0200
5 # Node ID 069dfa3715b1d30905ff0ea1c0f66db88ce146f9
6 # Parent 6c779ec81530b6784a714063af66085681ab7318
7 [libFuzzer] Make fuzzer_allocator explicit
8
9 diff --git a/FuzzerDefs.h b/FuzzerDefs.h
10 --- a/FuzzerDefs.h
11 +++ b/FuzzerDefs.h
12 @@ -41,17 +41,17 @@ extern ExternalFunctions *EF;
13 // We are using a custom allocator to give a different symbol name to STL
14 // containers in order to avoid ODR violations.
15 template<typename T>
16 class fuzzer_allocator: public std::allocator<T> {
17 public:
18 fuzzer_allocator() = default;
19
20 template<class U>
21 - fuzzer_allocator(const fuzzer_allocator<U>&) {}
22 + explicit fuzzer_allocator(const fuzzer_allocator<U>&) {}
23
24 template<class Other>
25 struct rebind { typedef fuzzer_allocator<Other> other; };
26 };
27
28 template<typename T>
29 using Vector = std::vector<T, fuzzer_allocator<T>>;
30