HomePhabricator

[test] Speed up fuzzing by ~200x when using afl-fuzz

Description

[test] Speed up fuzzing by ~200x when using afl-fuzz

Summary:

Enable the `afl-clang-fast++` features deferred forkserver
(`__AFL_INIT`) and persistent mode (`__AFL_LOOP(1000)`).

Backport of core PR10415:
https://github.com/bitcoin/bitcoin/pull/10415/files

Test Plan:
Follow the fuzzing.md to run the fuzzer.
Check that the performance are improved by using afl-clang-fast.
My numbers:

  • Before: ~60/s
  • After: ~7300/s

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4578

Details

Provenance
practicalswift <practicalswift@users.noreply.github.com>Authored on May 18 2017, 19:37
FabienCommitted on Nov 29 2019, 14:17
FabienPushed on Nov 29 2019, 14:17
Reviewer
Restricted Project
Differential Revision
D4578: [test] Speed up fuzzing by ~200x when using afl-fuzz
Parents
rABCbdfa82d939e6: [CMAKE] Build test_bitcoin_fuzzy
Branches
Unknown
Tags
Unknown