tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed. #17235

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:fuzz-initialize-when-needed changing 2 files +11 −12
  1. practicalswift commented at 9:53 PM on October 23, 2019: contributor

    Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed.

    As suggested by MarcoFalke in #17018 (review).

  2. practicalswift force-pushed on Oct 23, 2019
  3. fanquake added the label Tests on Oct 23, 2019
  4. in src/test/fuzz/fuzz.cpp:48 in fd17c6480a outdated
      45 | @@ -50,7 +46,8 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
      46 |  // the main(...) function.
      47 |  __attribute__((weak))
      48 |  #endif
    


    MarcoFalke commented at 10:16 PM on October 23, 2019:

    What is this used for? I don't think it is possible to run the fuzzers on windows


    practicalswift commented at 8:09 AM on October 24, 2019:

    Removed CygWin workaround.

  5. in src/test/fuzz/deserialize.cpp:32 in fd17c6480a outdated
      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
    


    MarcoFalke commented at 10:16 PM on October 23, 2019:

    Might just initialize it for all of them. The overhead is zero.


    practicalswift commented at 8:09 AM on October 24, 2019:

    Done! Please re-review :)

  6. DrahtBot commented at 2:19 AM on October 24, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17225 (tests: Test serialisation as part of deserialisation fuzzing. Test round-trip equality where possible. by practicalswift)
    • #17109 (tests: Add fuzzing harness for various functions consuming only integrals by practicalswift)
    • #17071 (tests: Add fuzzing harness for CheckBlock(...) and other CBlock related functions by practicalswift)
    • #17051 (tests: Add deserialization fuzzing harnesses by practicalswift)
    • #16975 (test: Show debug log on unit test failure by MarcoFalke)

    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.

  7. tests: Skip unnecessary fuzzer initialisation. Hold ECCVerifyHandle only when needed. db4bd32cc3
  8. tests: Remove Cygwin WinMain workaround c2f964a674
  9. practicalswift force-pushed on Oct 24, 2019
  10. MarcoFalke referenced this in commit d53828cb79 on Oct 24, 2019
  11. MarcoFalke merged this on Oct 24, 2019
  12. MarcoFalke closed this on Oct 24, 2019

  13. MarcoFalke referenced this in commit 1c5e0ccaba on Oct 31, 2019
  14. sidhujag referenced this in commit 0c2a515915 on Oct 31, 2019
  15. jasonbcox referenced this in commit fed8c74652 on Jul 10, 2020
  16. sidhujag referenced this in commit d9b3994379 on Nov 10, 2020
  17. practicalswift deleted the branch on Apr 10, 2021
  18. kittywhiskers referenced this in commit a11646851a on Aug 2, 2021
  19. kittywhiskers referenced this in commit 251eecefe4 on Aug 2, 2021
  20. kittywhiskers referenced this in commit 2890e2a436 on Aug 2, 2021
  21. kittywhiskers referenced this in commit 2887144d4b on Aug 5, 2021
  22. kittywhiskers referenced this in commit 31ae51b20a on Aug 5, 2021
  23. kittywhiskers referenced this in commit 70bce3186c on Aug 5, 2021
  24. PastaPastaPasta referenced this in commit e1ea3bc169 on Aug 6, 2021
  25. kittywhiskers referenced this in commit 40c74ed0b2 on Aug 8, 2021
  26. kittywhiskers referenced this in commit 53294e12b1 on Aug 11, 2021
  27. 5tefan referenced this in commit f9bd3ad683 on Aug 12, 2021
  28. PastaPastaPasta referenced this in commit 7911ddc99d on Feb 26, 2022
  29. PastaPastaPasta referenced this in commit 2b5bfa9659 on Feb 26, 2022
  30. PastaPastaPasta referenced this in commit 22b08e8046 on Mar 1, 2022
  31. PastaPastaPasta referenced this in commit 10b6f23a21 on Mar 3, 2022
  32. PastaPastaPasta referenced this in commit 662a38bb7a on Mar 3, 2022
  33. PastaPastaPasta referenced this in commit 8e12e2611f on Mar 5, 2022
  34. PastaPastaPasta referenced this in commit b023e9687b on Mar 7, 2022
  35. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 00:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me