Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed.
As suggested by MarcoFalke in #17018 (review).
Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed.
As suggested by MarcoFalke in #17018 (review).
45 | @@ -50,7 +46,8 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
46 | // the main(...) function.
47 | __attribute__((weak))
48 | #endif
What is this used for? I don't think it is possible to run the fuzzers on windows
Removed CygWin workaround.
23 | @@ -23,6 +24,14 @@ 24 | 25 | #include <test/fuzz/fuzz.h> 26 | 27 | +void initialize() 28 | +{ 29 | +#if BLOCKUNDO_DESERIALIZE || COINS_DESERIALIZE || TXOUTCOMPRESSOR_DESERIALIZE || TXUNDO_DESERIALIZE 30 | + // Fuzzers using pubkey must hold an ECCVerifyHandle. 31 | + static const auto verify_handle = MakeUnique<ECCVerifyHandle>(); 32 | +#endif
Might just initialize it for all of them. The overhead is zero.
Done! Please re-review :)
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.