tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) #19052

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-afl-limit changing 1 files +0 −2
  1. practicalswift commented at 3:24 PM on May 22, 2020: contributor

    Don't limit fuzzing inputs to 1 MB for afl-fuzz.

    This change provides a level playing field for all fuzzers which allows for fair benchmarking using projects such as the excellent FuzzBench project.

    Prior to this commit we limited afl-fuzz to ≤1 MB inputs but allowed unlimited length inputs for all other fuzzers.

  2. tests: Don't limit fuzzing inputs to 1 MB for afl-fuzz (now: ∞ ∀ fuzzers) 6a239e72eb
  3. fanquake added the label Tests on May 22, 2020
  4. MarcoFalke commented at 3:58 PM on May 22, 2020: member

    ACK 6a239e72eb403d3ac5c7db203c5b3a24ef49a48b The maximum data size should be a runtime option, not a compile time hardcoded value.

  5. in src/test/fuzz/fuzz.cpp:23 in 6a239e72eb
      18 | @@ -19,8 +19,6 @@ static bool read_stdin(std::vector<uint8_t>& data)
      19 |      ssize_t length = 0;
      20 |      while ((length = read(STDIN_FILENO, buffer, 1024)) > 0) {
      21 |          data.insert(data.end(), buffer, buffer + length);
      22 | -
      23 | -        if (data.size() > (1 << 20)) return false;
      24 |      }
      25 |      return length == 0;
    


    MarcoFalke commented at 4:00 PM on May 22, 2020:

    Why is length == 0 invalid? Seems overly restrictive.


    practicalswift commented at 9:09 PM on May 22, 2020:

    It is the other way around: length != 0 is invalid. length == 0 means that end of file was reached which is what we want :)

  6. MarcoFalke merged this on May 22, 2020
  7. MarcoFalke closed this on May 22, 2020

  8. deadalnix referenced this in commit d87c0e8114 on Jan 26, 2021
  9. practicalswift deleted the branch on Apr 10, 2021
  10. PastaPastaPasta referenced this in commit c8b39c3915 on Sep 17, 2021
  11. PastaPastaPasta referenced this in commit 7e573fbd52 on Sep 19, 2021
  12. thelazier referenced this in commit 246616f091 on Sep 25, 2021
  13. DrahtBot locked this on Aug 16, 2022
Labels

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