tests: Add fuzzing harness for CKey and key related functions #17972

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:fuzzers-key changing 3 files +317 −0
  1. practicalswift commented at 1:08 PM on January 21, 2020: contributor

    Add fuzzing harness for CKey and key related functions.

    How to test this PR

    $ make distclean
    $ ./autogen.sh
    $ CC=clang CXX=clang++ ./configure --enable-fuzz \
          --with-sanitizers=address,fuzzer,undefined
    $ make
    $ src/test/fuzz/key
    …
    [#4096](/bitcoin-bitcoin/4096/)   pulse  cov: 5736 ft: 6960 corp: 27/833b lim: 67 exec/s: 2048 rss: 122Mb
    [#8192](/bitcoin-bitcoin/8192/)   pulse  cov: 5736 ft: 6960 corp: 27/833b lim: 103 exec/s: 2048 rss: 143Mb
    [#13067](/bitcoin-bitcoin/13067/)  NEW    cov: 5736 ft: 6965 corp: 28/865b lim: 154 exec/s: 2177 rss: 166Mb L: 32/32 MS: 1 ChangeBit-
    [#16384](/bitcoin-bitcoin/16384/)  pulse  cov: 5736 ft: 6965 corp: 28/865b lim: 182 exec/s: 2048 rss: 181Mb
    [#32768](/bitcoin-bitcoin/32768/)  pulse  cov: 5736 ft: 6965 corp: 28/865b lim: 347 exec/s: 2184 rss: 258Mb
    …
    
  2. fanquake added the label Tests on Jan 21, 2020
  3. practicalswift requested review from MarcoFalke on Jan 21, 2020
  4. practicalswift force-pushed on Jan 21, 2020
  5. practicalswift force-pushed on Jan 21, 2020
  6. DrahtBot commented at 3:39 PM on January 21, 2020: 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:

    • #18126 (tests: Add fuzzing harness testing the locale independence of the strencodings.h functions by practicalswift)
    • #17926 (tests: Add key_io fuzzing harness. Fuzz additional functions in existing fuzzing harnesses. by practicalswift)

    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. practicalswift force-pushed on Jan 21, 2020
  8. Binh0103 approved
  9. practicalswift force-pushed on Jan 21, 2020
  10. practicalswift force-pushed on Jan 21, 2020
  11. practicalswift force-pushed on Jan 22, 2020
  12. practicalswift force-pushed on Jan 22, 2020
  13. in src/test/fuzz/key.cpp:30 in 1fc259789c outdated
      25 | +#include <numeric>
      26 | +#include <string>
      27 | +#include <vector>
      28 | +
      29 | +namespace {
      30 | +class ECCContext
    


    MarcoFalke commented at 7:59 PM on March 5, 2020:

    Is this needed to prevent leaks on exit?


    practicalswift commented at 9:14 PM on March 5, 2020:

    It was a while since I wrote the code but IIRC I assumed that ECC_Stop(); was needed run at shutdown in order to avoid leaks (as part of ~ECCContext()). That appears not to be the case so I've now dropped ECCContext. Please re-review :)

  14. MarcoFalke approved
  15. MarcoFalke commented at 8:06 PM on March 5, 2020: member

    ACK

  16. tests: Add fuzzing harness for CKey related functions f4691b6c21
  17. practicalswift force-pushed on Mar 5, 2020
  18. MarcoFalke merged this on Mar 5, 2020
  19. MarcoFalke closed this on Mar 5, 2020

  20. jasonbcox referenced this in commit 0f35d020c0 on Nov 4, 2020
  21. practicalswift deleted the branch on Apr 10, 2021
  22. kittywhiskers referenced this in commit a132593c2f on Feb 27, 2022
  23. kittywhiskers referenced this in commit 74ac746c89 on Feb 27, 2022
  24. kittywhiskers referenced this in commit 60676b03ae on Feb 28, 2022
  25. kittywhiskers referenced this in commit b9444728d2 on Feb 28, 2022
  26. kittywhiskers referenced this in commit c5c959131c on Feb 28, 2022
  27. kittywhiskers referenced this in commit f45cd45ef2 on Mar 13, 2022
  28. kittywhiskers referenced this in commit 2e03b4f492 on Mar 24, 2022
  29. kittywhiskers referenced this in commit feb4ce584e on Mar 24, 2022
  30. 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-15 06:14 UTC

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