Files
darkfi/fuzz/honggfuzz
y e23a5e9ee5 fuzz: Add differential fuzzing for BTC VarInt
DarkFi's VarInt struct is meant to be equivalent to the one used by BTC.
Most of the source code is extremeley similar. This commit adds very
basic tests to ensure equivalence between DarkFi's implementation and
the one used by the BTC crate.
The tests included here are quite basic. Future work can expand on
the testing done on the deserialized values.
This harness can also be used as as guide or template for future
differential fuzzing.
2023-09-06 10:57:28 +00:00
..
2023-09-04 16:42:34 +00:00
2023-09-04 16:42:34 +00:00
2023-09-04 16:42:34 +00:00

Fuzz2 - honggfuzz

This directory contains files pertaining to fuzz testing with the honggfuzz fuzzer.

We're trying this tool out alongside libfuzzer (covered in darkfi/fuzz/).

Comparison to libfuzzer

  • Does not halt execution on crashes (can discover multiple crashes in one fuzzing session)
  • Fewer memory issues (tool less likely to crash, easier to configure)
  • Better UI

Install

cargo install honggfuzz

Usage

# Build targets from Cargo.toml [[bin]] section
cargo hfuzz build
# Run
cargo hfuzz run zkbinary-decode

Further info: https://docs.rs/honggfuzz/latest/honggfuzz/#how-to-use-this-crate