tests: Fill fuzzing coverage gaps for functions in consensus/validation.h, primitives/block.h and util/translation.h #18938

pull practicalswift wants to merge 4 commits into bitcoin:master from practicalswift:fuzzers-misc-5 changing 28 files +158 −87
  1. practicalswift commented at 6:46 PM on May 10, 2020: contributor
    • Fill fuzzing coverage gaps for functions in consensus/validation.h
    • Fill fuzzing coverage gaps for functions in primitives/block.h
    • Fill fuzzing coverage gaps for functions in util/translation.h
    • Switch from Optional<T> to std::optional<T> (C++17). Run clang-format.

    See doc/fuzzing.md for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the Bitcoin Core fuzzing corpus repo.

    Happy fuzzing :)

  2. practicalswift force-pushed on May 10, 2020
  3. practicalswift force-pushed on May 10, 2020
  4. DrahtBot added the label Tests on May 10, 2020
  5. in src/test/fuzz/asmap_direct.cpp:38 in ba75623ad2 outdated
      33 | @@ -34,7 +34,8 @@ void test_one_input(const std::vector<uint8_t>& buffer)
      34 |      if (SanityCheckASMap(asmap, buffer.size() - 1 - sep_pos)) {
      35 |          // Verify that for valid asmaps, no prefix (except up to 7 zero padding bits) is valid.
      36 |          std::vector<bool> asmap_prefix = asmap;
      37 | -        while (!asmap_prefix.empty() && asmap_prefix.size() + 7 > asmap.size() && asmap_prefix.back() == false) asmap_prefix.pop_back();
      38 | +        while (!asmap_prefix.empty() && asmap_prefix.size() + 7 > asmap.size() && asmap_prefix.back() == false)
      39 | +            asmap_prefix.pop_back();
    


    MarcoFalke commented at 2:27 PM on May 11, 2020:

    Either one line or multiple lines with {}, but not this ;)


    practicalswift commented at 6:15 PM on May 11, 2020:

    Good point! I'll help clang-format with this :)

  6. MarcoFalke approved
  7. MarcoFalke commented at 2:28 PM on May 11, 2020: member

    Concept ACK

  8. practicalswift force-pushed on May 11, 2020
  9. MarcoFalke commented at 8:02 PM on May 13, 2020: member

    Needs rebase

  10. practicalswift force-pushed on May 13, 2020
  11. practicalswift commented at 9:43 PM on May 13, 2020: contributor

    Rebased! :)

  12. tests: Fill fuzzing coverage gaps for functions in primitives/block.h c0bbf8193d
  13. tests: Fill fuzzing coverage gaps for functions in consensus/validation.h b74f3d6c45
  14. tests: Fill fuzzing coverage gaps for functions in util/translation.h fb559c1170
  15. Switch from Optional<T> to std::optional<T> (C++17). Run clang-format. cd34038cbd
  16. practicalswift force-pushed on May 14, 2020
  17. practicalswift commented at 6:54 PM on May 14, 2020: contributor

    Fixed compilation failure introduced during last rebased. Sorry about that! :)

  18. DrahtBot commented at 11:45 AM on May 17, 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:

    • #18994 (tests: Add fuzzing harnesses for functions in script/ 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.

  19. MarcoFalke merged this on May 17, 2020
  20. MarcoFalke closed this on May 17, 2020

  21. vasild commented at 10:01 AM on May 22, 2020: member

    Probably --enable-fuzz should automatically turn on --enable-c++17. It bricks after a few minutes of compilation if configured with just ./configure --enable-fuzz.

  22. MarcoFalke commented at 10:27 AM on May 22, 2020: member

    @vasild Agree, but this should be filed as a new issue or solved in a pull request. A comment on a merged pull is likely going to be ignored.

  23. vasild commented at 9:56 AM on June 5, 2020: member
  24. deadalnix referenced this in commit f1300adec3 on Jan 26, 2021
  25. practicalswift deleted the branch on Apr 10, 2021
  26. DrahtBot locked this on Aug 16, 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