From 51a4e11d6e37d3c44bd4b9fd26ff7454331d29de Mon Sep 17 00:00:00 2001 From: Pasta Date: Mon, 26 Aug 2019 17:25:02 -0500 Subject: [PATCH] dashify what made sense in fuzzing.md Signed-off-by: Pasta --- doc/fuzzing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/fuzzing.md b/doc/fuzzing.md index 5dedcb51c8..e9e55f03ed 100644 --- a/doc/fuzzing.md +++ b/doc/fuzzing.md @@ -1,7 +1,7 @@ -Fuzz-testing Bitcoin Core +Fuzz-testing Dash Core ========================== -A special test harness `test_bitcoin_fuzzy` is provided to provide an easy +A special test harness `test_dash_fuzzy` is provided to provide an easy entry point for fuzzers and the like. In this document we'll describe how to use it with AFL. @@ -20,13 +20,13 @@ export AFLPATH=$PWD Instrumentation ---------------- -To build Bitcoin Core using AFL instrumentation (this assumes that the +To build Dash Core using AFL instrumentation (this assumes that the `AFLPATH` was set as above): ``` ./configure --disable-ccache --disable-shared --enable-tests CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++ export AFL_HARDEN=1 cd src/ -make test/test_bitcoin_fuzzy +make test/test_dash_fuzzy ``` We disable ccache because we don't want to pollute the ccache with instrumented objects, and similarly don't want to use non-instrumented cached objects linked @@ -35,7 +35,7 @@ in. The fuzzing can be sped up significantly (~200x) by using `afl-clang-fast` and `afl-clang-fast++` in place of `afl-gcc` and `afl-g++` when compiling. When compiling using `afl-clang-fast`/`afl-clang-fast++` the resulting -`test_bitcoin_fuzzy` binary will be instrumented in such a way that the AFL +`test_dash_fuzzy` binary will be instrumented in such a way that the AFL features "persistent mode" and "deferred forkserver" can be used. See https://github.com/mcarpenter/afl/tree/master/llvm_mode for details. @@ -65,7 +65,7 @@ Fuzzing To start the actual fuzzing use: ``` -$AFLPATH/afl-fuzz -i ${AFLIN} -o ${AFLOUT} -m52 -- test/test_bitcoin_fuzzy +$AFLPATH/afl-fuzz -i ${AFLIN} -o ${AFLOUT} -m52 -- test/test_dash_fuzzy ``` You may have to change a few kernel parameters to test optimally - `afl-fuzz`