fuzz: Use afl++ shared-memory fuzzing #28460

pull dergoegge wants to merge 1 commits into bitcoin:master from dergoegge:2023-09-afl++-shmem changing 1 files +8 −6
  1. dergoegge commented at 1:55 PM on September 12, 2023: member
  2. DrahtBot commented at 1:55 PM on September 12, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK MarcoFalke
    Concept ACK brunoerg

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Sep 12, 2023
  4. dergoegge commented at 1:57 PM on September 12, 2023: member

    Would be nice to have a afl++ compiler CI task for stuff like this but probably not worth it overall.

  5. in src/test/fuzz/fuzz.cpp:206 in d75919d428 outdated
     206 | -        std::vector<uint8_t> buffer;
     207 | -        if (!read_stdin(buffer)) {
     208 | -            continue;
     209 | -        }
     210 | -        test_one_input(buffer);
     211 | +        test_one_input({buffer, __AFL_FUZZ_TESTCASE_LEN});
    


    maflcko commented at 2:01 PM on September 12, 2023:

    From the doc you linked to:

     int len = __AFL_FUZZ_TESTCASE_LEN;  // don't use the macro directly in a
                                            // call!
    

    dergoegge commented at 2:09 PM on September 12, 2023:

    Fixed

  6. maflcko approved
  7. maflcko commented at 2:01 PM on September 12, 2023: member

    Do you have any number to share on how much difference this makes?

  8. [fuzz] Use afl++ shared-memory fuzzing
    Using shared-memory is faster than reading from stdin, see
    https://github.com/AFLplusplus/AFLplusplus/blob/7d2122e0596132f9344a5d0896020ebc79cd33db/instrumentation/README.persistent_mode.md
    97e2e1d641
  9. dergoegge force-pushed on Sep 12, 2023
  10. DrahtBot added the label CI failed on Sep 12, 2023
  11. maflcko commented at 2:10 PM on September 12, 2023: member

    review ACK 97e2e1d641016cd7b74848b9560e3771f092c1ea

    But it would be good to have number to compare before and after

  12. dergoegge commented at 2:13 PM on September 12, 2023: member

    Do you have any number to share on how much difference this makes?

    2x according to the docs but that should be subject to the type of disk being used.

    I'm seeing a 1.2-1.3x (nvme ssd) running the miniscript_string target.

  13. brunoerg commented at 2:56 PM on September 12, 2023: contributor

    Concept ACK

  14. DrahtBot removed the label CI failed on Sep 12, 2023
  15. fanquake merged this on Sep 14, 2023
  16. fanquake closed this on Sep 14, 2023

  17. Frank-GER referenced this in commit 2c9b066e9a on Sep 19, 2023
  18. bitcoin locked this on Sep 13, 2024

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-28 21:13 UTC

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