Files
darkfi/fuzz/honggfuzz
y 9d97aebf50 fuzz: Add fuzz harness for zkas compilation
Create a fuzz harness to test the ./zkas binary compilation process. The
whole pipeline is tested: Lexer, Parser, Compiler, Analyzer. This is
performed by copying the relevant code from bin/zkas/src/main.rs.

Testing the entire pipeline like this is not very efficient in terms of
fuzzing cycles but on the other hand it is a quick-and-dirty way to find
results. It also benefits from testing the actual inputs to the binary
in the way it's expecting, rather than checking each of the components
in a piecemeal way using interfaces that aren't expected to be exposed
anyway.
2023-09-16 23:00:24 +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