1
mirror of https://github.com/bitcoin/bitcoin synced 2024-10-03 01:41:53 +02:00

Merge #18739: doc: Document how to fuzz Bitcoin Core using Honggfuzz

bb1ec36fb1 doc: Document how to fuzz Bitcoin Core using honggfuzz (practicalswift)

Pull request description:

  Document how to fuzz Bitcoin Core using Honggfuzz.

ACKs for top commit:
  fanquake:
    ACK bb1ec36fb1 - did a couple quick runs on a severely under powered VM.

Tree-SHA512: 117944c52763a5672f988c62fecb01b85f19f3827fad5582a51464aefdaac4d9a9cd81e2118199f6ea1bb3ab0893c8459ca3d1df7f67bfcf215d5e305225f210
This commit is contained in:
MarcoFalke 2020-04-25 09:26:44 -04:00
commit bab81f7e4d
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -133,3 +133,25 @@ $ afl/afl-fuzz -i inputs/ -o outputs/ -- src/test/fuzz/bech32
```
Read the [`afl-fuzz` documentation](https://github.com/google/afl) for more information.
# Fuzzing Bitcoin Core using Honggfuzz
## Quickstart guide
To quickly get started fuzzing Bitcoin Core using [Honggfuzz](https://github.com/google/honggfuzz):
```sh
$ git clone https://github.com/bitcoin/bitcoin
$ cd bitcoin/
$ ./autogen.sh
$ git clone https://github.com/google/honggfuzz
$ cd honggfuzz/
$ make
$ cd ..
$ CC=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang CXX=$(pwd)/honggfuzz/hfuzz_cc/hfuzz-clang++ ./configure --enable-fuzz --with-sanitizers=address,undefined
$ make
$ mkdir -p inputs/
$ honggfuzz/honggfuzz -i inputs/ -- src/test/fuzz/process_message
```
Read the [Honggfuzz documentation](https://github.com/google/honggfuzz/blob/master/docs/USAGE.md) for more information.