diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-16 20:38:53 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-23 11:10:10 +0000 |
commit | fdef8bbf2f824a87f70b755155e9e1a8cd19fdcb (patch) | |
tree | 7ac03cfb328a6578cea6767a17d60f8124d74c00 /src/test | |
parent | c34b88620dc8435b83e6744895f2ecd3c9ec8de7 (diff) |
tests: Allow for using non-default fuzzing initialization
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/fuzz.cpp | 4 | ||||
-rw-r--r-- | src/test/fuzz/fuzz.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp index cfa160dde2..a8a108cd18 100644 --- a/src/test/fuzz/fuzz.cpp +++ b/src/test/fuzz/fuzz.cpp @@ -22,7 +22,9 @@ static bool read_stdin(std::vector<uint8_t>& data) return length == 0; } -static void initialize() +// Default initialization: Override using a non-weak initialize(). +__attribute__((weak)) +void initialize() { const static auto verify_handle = MakeUnique<ECCVerifyHandle>(); } diff --git a/src/test/fuzz/fuzz.h b/src/test/fuzz/fuzz.h index 573bd572db..3be202b16e 100644 --- a/src/test/fuzz/fuzz.h +++ b/src/test/fuzz/fuzz.h @@ -8,7 +8,7 @@ #include <stdint.h> #include <vector> - +void initialize(); void test_one_input(const std::vector<uint8_t>& buffer); #endif // BITCOIN_TEST_FUZZ_FUZZ_H |