diff options
| author | MarcoFalke <[email protected]> | 2019-10-31 10:12:58 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2019-10-31 10:13:10 -0400 |
| commit | 1c5e0ccabae10eaab21960aece3c6f70cb204e58 (patch) | |
| tree | befee0e5914efa3a582dea4d009b72a304c30bcd /src/test/fuzz/eval_script.cpp | |
| parent | Merge #17308: nsis: Write to correct filename in first place (diff) | |
| parent | tests: Add fuzzer initialization (hold ECCVerifyHandle) (diff) | |
| download | discoin-1c5e0ccabae10eaab21960aece3c6f70cb204e58.tar.xz discoin-1c5e0ccabae10eaab21960aece3c6f70cb204e58.zip | |
Merge #17274: tests: Fix fuzzers eval_script and script_flags by re-adding ECCVerifyHandle dependency
9cae3d5e94f4481e0d251c924314e57187a07a60 tests: Add fuzzer initialization (hold ECCVerifyHandle) (practicalswift)
Pull request description:
The fuzzers `eval_script` and `script_flags` require holding `ECCVerifyHandle`.
This is a follow-up to #17235 which accidentally broke those two fuzzers.
Sorry about the temporary breakage my fuzzing friends: it took a while to fuzz before reaching these code paths. That's why this wasn't immediately caught. Sorry.
Top commit has no ACKs.
Tree-SHA512: 67ebb155ba90894c07eac630e33f2f985c97bdf96dc751f312633414abeccdca20315d7d8f2ec4ee3ac810b666a1e44afb4ea8bc28165151cd51b623f816cac2
Diffstat (limited to 'src/test/fuzz/eval_script.cpp')
| -rw-r--r-- | src/test/fuzz/eval_script.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/fuzz/eval_script.cpp b/src/test/fuzz/eval_script.cpp index 9444cd489..7acdd7685 100644 --- a/src/test/fuzz/eval_script.cpp +++ b/src/test/fuzz/eval_script.cpp @@ -2,12 +2,19 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <pubkey.h> #include <script/interpreter.h> -#include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> +#include <test/fuzz/FuzzedDataProvider.h> +#include <util/memory.h> #include <limits> +void initialize() +{ + static const auto verify_handle = MakeUnique<ECCVerifyHandle>(); +} + void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); |