tests: Add fuzzing harness for various CScript related functions #17083

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:fuzzers-script changing 2 files +71 −0
  1. practicalswift commented at 10:07 AM on October 9, 2019: contributor

    Add fuzzing harness for various CScript related functions.

    Testing this PR

    Run:

    $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
    $ make
    $ src/test/fuzz/script
    …
    # And to to quickly verify that the relevant code regions are triggered, that the
    # fuzzing throughput seems reasonable, etc.
    $ contrib/devtools/test_fuzzing_harnesses.sh '^script$'
    

    test_fuzzing_harnesses.sh can be found in PR #17000.

  2. fanquake added the label Tests on Oct 9, 2019
  3. DrahtBot commented at 12:07 PM on October 9, 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)
    • #17136 (tests: Add fuzzing harness for various PSBT related functions by practicalswift)
    • #17051 (tests: Add deserialization fuzzing harnesses by practicalswift)
    • #17050 (tests: Add fuzzing harnesses for functions parsing scripts, numbers, JSON and HD keypaths (bip32) 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.

  4. DrahtBot added the label Needs rebase on Oct 10, 2019
  5. practicalswift force-pushed on Oct 10, 2019
  6. DrahtBot removed the label Needs rebase on Oct 10, 2019
  7. in src/test/fuzz/script.cpp:19 in edc77a4149 outdated
      14 | +#include <streams.h>
      15 | +#include <test/fuzz/fuzz.h>
      16 | +
      17 | +void test_one_input(const std::vector<uint8_t>& buffer)
      18 | +{
      19 | +    CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
    


    MarcoFalke commented at 5:59 PM on October 15, 2019:

    A script is a string of raw bytes when serialized, no? In that case, we wouldn't need the CDataStream


    practicalswift commented at 6:26 PM on October 16, 2019:

    Updated! Please re-review :)

  8. practicalswift force-pushed on Oct 16, 2019
  9. in test/fuzz/test_runner.py:18 in b6de958439 outdated
      11 | @@ -12,6 +12,10 @@
      12 |  import subprocess
      13 |  import logging
      14 |  
      15 | +# Fuzzers known to lack a seed corpus in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus
      16 | +FUZZERS_MISSING_CORPORA = [
      17 | +    "script",
      18 | +]
    


    MarcoFalke commented at 8:07 PM on October 24, 2019:

    can remove?


    practicalswift commented at 9:23 PM on October 24, 2019:

    Fixed! Please re-review :)

  10. MarcoFalke commented at 9:07 PM on October 24, 2019: member

    ACK b6de95843982f7bf450fd03f8d71577a6f24d1db

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK b6de95843982f7bf450fd03f8d71577a6f24d1db
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUgkvgwAiGdaNmf4ABeRBuPLcEFRJ285f2hJg8Wf8Gcmwop6ExPT0Sue4eN+VRYc
    t9Zlm6ZEZqyK6chPafijQ9nrbHsFUEbibCUT9hZ7FJgSoWOxh7ahyPaN00HXjucV
    bFBVLUfdJ/N3F3in2XFFiWuK2KAHkRCnf642FmeZ0uM0QVvjOdYJzB51JZaXbRrJ
    h8sRqGL6+Wd/m2lADT0454rkUYpkrvqfN7K2Y9M7yY8Ey7VmFR9Jpp8mcQeEWiEp
    BmZ4MwBg9xpzX2DnxDuT/ajja8kzgv2VeY/M3jbAB/BYpeikuutlUUeoydTs/aZ7
    8L6oOsxOP99vL2Aq1CWOb8m8g5S2IMmS6c0xWXwvrjWEXPDNo+FlfaYbBI6P9wJS
    9w8xfzxQd+/CXB3nLAr5ImNnOz2Qft6kCeqxOWGDWV7Rd87VT/UYjOJkuPienzsl
    Y4fq9mvlGjaUJbtSf3JHD+S5e2DnCTxAkiqzXqrGW8gMkw4uY+KxcUMhPvjqvfCL
    Pou3ZL9B
    =sD4t
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash 7b53754fa9e50b769d383a78f34b54a3e8ff4ddd3b902ddcb99121307e7f81e6 -

    </details>

  11. practicalswift force-pushed on Oct 24, 2019
  12. practicalswift force-pushed on Oct 25, 2019
  13. practicalswift commented at 8:22 AM on October 25, 2019: contributor

    Rebased and added ECCVerifyHandle initialization.

  14. tests: Add fuzzing harness for various CScript related functions dc2fdb9907
  15. practicalswift force-pushed on Oct 25, 2019
  16. MarcoFalke referenced this in commit 693e40090a on Oct 25, 2019
  17. MarcoFalke merged this on Oct 25, 2019
  18. MarcoFalke closed this on Oct 25, 2019

  19. jasonbcox referenced this in commit c1d515d3d0 on Jul 13, 2020
  20. practicalswift deleted the branch on Apr 10, 2021
  21. kittywhiskers referenced this in commit a94078a4b7 on Feb 27, 2022
  22. kittywhiskers referenced this in commit d4143f9bc4 on Feb 27, 2022
  23. kittywhiskers referenced this in commit b104e98ac8 on Feb 28, 2022
  24. kittywhiskers referenced this in commit 961110f2a8 on Feb 28, 2022
  25. kittywhiskers referenced this in commit c8e3592452 on Feb 28, 2022
  26. kittywhiskers referenced this in commit 4f0f03532c on Mar 13, 2022
  27. kittywhiskers referenced this in commit fd4c6f8239 on Mar 24, 2022
  28. vijaydasmp referenced this in commit 23efc68863 on Mar 26, 2022
  29. 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 15:14 UTC

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