tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals #17996

pull practicalswift wants to merge 4 commits into bitcoin:master from practicalswift:fuzzers-float changing 6 files +121 −0
  1. practicalswift commented at 2:52 PM on January 24, 2020: contributor

    Add simple fuzzing harness for functions with floating-point parameters (such as ser_double_to_uint64(double), etc.).

    Add serialization/deserialization fuzzing for integral types.

    Add missing includes.

    To test this PR:

    $ make distclean
    $ ./autogen.sh
    $ CC=clang CXX=clang++ ./configure --enable-fuzz \
          --with-sanitizers=address,fuzzer,undefined
    $ make
    $ src/test/fuzz/float
    …
    
  2. practicalswift renamed this:
    tests: Add fuzzing harness for functions with floating-point parameters
    tests: Add fuzzing harness for functions with floating-point parameters. Update FuzzedDataProvider.h.
    on Jan 24, 2020
  3. DrahtBot added the label Build system on Jan 24, 2020
  4. DrahtBot added the label Tests on Jan 24, 2020
  5. practicalswift renamed this:
    tests: Add fuzzing harness for functions with floating-point parameters. Update FuzzedDataProvider.h.
    tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals. Update FuzzedDataProvider.h.
    on Jan 24, 2020
  6. fanquake removed the label Build system on Jan 24, 2020
  7. practicalswift force-pushed on Jan 27, 2020
  8. Add missing includes c2bd588860
  9. tests: Add fuzzing harness for functions taking floating-point types as input 3c82b92d2e
  10. practicalswift force-pushed on Jan 31, 2020
  11. practicalswift renamed this:
    tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals. Update FuzzedDataProvider.h.
    tests: Add fuzzing harness for serialization/deserialization of floating-points and integrals
    on Jan 31, 2020
  12. DrahtBot commented at 6:32 AM on February 11, 2020: contributor

    <!--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:

    • #18190 (tests: Add fuzzing harness for Golomb-Rice coding (GolombRiceEncode/GolombRiceDecode) by practicalswift)
    • #18086 (Accurately account for mempool index memory by sipa)

    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.

  13. DrahtBot cross-referenced this on Feb 11, 2020 from issue Accurately account for mempool index memory by sipa
  14. DrahtBot cross-referenced this on Feb 21, 2020 from issue tests: Add fuzzing harness for Golomb-Rice coding (GolombRiceEncode/GolombRiceDecode) by practicalswift
  15. in src/test/fuzz/integer.cpp:138 in ee264bab48 outdated
     133 | +
     134 | +        uint256 deserialized_u256;
     135 | +        stream << u256;
     136 | +        stream >> deserialized_u256;
     137 | +        assert(u256 == deserialized_u256);
     138 | +
    


    MarcoFalke commented at 8:15 PM on March 5, 2020:

    Could also assert that the data stream is empty after each operation?


    practicalswift commented at 8:36 PM on March 5, 2020:

    Oh, of course! Good idea. Now fixed :)

  16. MarcoFalke approved
  17. MarcoFalke commented at 8:15 PM on March 5, 2020: member

    ACK

  18. tests: Add serialization/deserialization fuzzing for integral types 8f6fb0a85a
  19. tests: Add float to FUZZERS_MISSING_CORPORA (temporarily) 9ff41f6419
  20. practicalswift force-pushed on Mar 5, 2020
  21. MarcoFalke merged this on Mar 5, 2020
  22. MarcoFalke closed this on Mar 5, 2020

  23. sidhujag referenced this in commit 7b14e0622d on Mar 7, 2020
  24. MarkLTZ cross-referenced this on Apr 4, 2020 from issue Bitcoin PR tracking by MarkLTZ
  25. deadalnix referenced this in commit 8d33df9072 on May 7, 2020
  26. ftrader referenced this in commit c0e5a017c2 on Aug 17, 2020
  27. jasonbcox referenced this in commit b8598eb359 on Nov 3, 2020
  28. sidhujag referenced this in commit 941061d2e5 on Nov 10, 2020
  29. practicalswift deleted the branch on Apr 10, 2021
  30. kwvg referenced this in commit 214cb52796 on Feb 27, 2022
  31. kwvg referenced this in commit 22bbd69c3e on Feb 27, 2022
  32. kwvg referenced this in commit e260a39a58 on Feb 28, 2022
  33. kwvg referenced this in commit 47d61eae35 on Feb 28, 2022
  34. kwvg referenced this in commit 534f262bfd on Feb 28, 2022
  35. kwvg referenced this in commit 4018b046c2 on Mar 13, 2022
  36. kwvg referenced this in commit 9ef64f6ac2 on Mar 24, 2022
  37. kwvg referenced this in commit 4678db1a04 on Mar 24, 2022
  38. bitcoin 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-05-20 06:54 UTC