What problem does it solve?
Coverage analysis helps fuzzing teams understand exactly which parts of the code are exercised by their harnesses, enabling targeted improvements and faster debugging.
Core Features & Use Cases
- Coverage instrumentation: Attach instrumentation to identify executed code paths during fuzzing campaigns.
- Progress tracking: Compare coverage across harness iterations to measure improvement.
- Harness optimization: Guide dictionary entries and seed selection by revealing uncovered branches.
- Use Case: When fuzzing a C/C++ project, run with LLVM/Clang coverage tools and generate reports to identify dead or unreachable code.
Quick Start
Build with coverage instrumentation: LLVM: clang++ -fprofile-instr-generate -fcoverage-mapping -O2 main.cc harness.cc execute-rt.cc -o fuzz_exec
Run the fuzzer to generate coverage data: LLVM_PROFILE_FILE=fuzz.profraw ./fuzz_exec corpus/
Create and inspect coverage reports: llvm-profdata merge -sparse fuzz.profraw -o fuzz.profdata
llvm-cov show ./fuzz_exec -instr-profile=fuzz.profdata -format=html -output-dir html/