libFuzzer vs AFL++ vs Honggfuzz: Choosing a Fuzzer
Compare libFuzzer, AFL++ and honggfuzz on harness style, speed, binary-only support, mutators and platforms, with a decision table and a shared harness.

Three open-source engines cover almost all C and C++ fuzzing: libFuzzer from the LLVM project, AFL++ (the maintained successor to American Fuzzy Lop) and honggfuzz from Google. They share the same core idea, coverage-guided mutation, and they accept the same kind of harness. They differ in how they run the target, what they can fuzz without source, how they scale, and how actively each one is developed. This post compares them as of LLVM 19, AFL++ 4.21 and honggfuzz 2.6, gives a decision table, and shows one harness that builds for all three, so the choice does not lock you in.
The short version is that the choice matters less than starting. Pick one, get a sanitized harness running, and revisit the question once you have findings. The sections below say when the first pick is wrong.
What each engine is
libFuzzer is an in-process, coverage-guided engine linked into the target. Your code supplies LLVMFuzzerTestOneInput, the engine supplies main and calls the function in a tight loop in one process, with no fork or exec per input. That makes it fast and simple, and it needs the source of everything you want instrumented. The LLVM documentation describes it as being in maintenance mode: bugs are fixed, and new features are unlikely. It remains widely used because it is stable, built into Clang and supported by the large fuzzing services.
AFL++ is a community fork that merged many research improvements into the original AFL. It runs the target as a separate process through a forkserver, or in-process in persistent mode, and instruments through compiler plugins, with extras such as CMPLOG for comparison feedback, custom mutators in C, Python or Rust, and QEMU and Frida modes for binaries without source. It is under active development.
honggfuzz is a multi-process, multi-threaded fuzzer that can use hardware performance counters for feedback on supported CPUs, in addition to compiler instrumentation. It supports persistent mode through HF_ITER, and it handles crash deduplication and Linux sanitizer integration well. It runs on Linux, BSD, macOS and, with limitations, Windows.
Comparison
| Question | libFuzzer | AFL++ | honggfuzz |
|---|---|---|---|
| Entry point | LLVMFuzzerTestOneInput | whole program, or the same function through a driver | whole program, or the same function through a driver |
| Execution model | in-process loop | forkserver, or persistent mode | fork or persistent, multi-threaded |
| Speed on small targets | very high | high in persistent mode, lower with a fork per input | high in persistent mode |
| Feedback | compiler instrumentation | compiler instrumentation, CMPLOG | instrumentation, optional hardware counters |
| Binary-only targets | no | yes (QEMU mode, Frida mode) | limited |
| Custom mutators | LLVMFuzzerCustomMutator | shared libraries in C, Python, Rust | limited |
| Parallel scaling | -fork, -jobs, manual corpus merge | built-in -M and -S syncing | multiple threads in one run |
| Corpus tools | -merge=1 | afl-cmin, afl-tmin | -minimize mode |
| Development status | maintenance mode | active | active |
| Supported by OSS-Fuzz | yes | yes | yes |
Speed: why in-process matters, and where it does not
Starting a process per input is expensive. A forkserver amortizes the exec and dynamic linking by forking from a pre-initialized parent, which is why AFL++ is practical without persistent mode, but each input still costs a fork, a pipe round trip and page-table copying. libFuzzer calls a function, so its per-input cost is the function's own work.
Persistent mode closes the gap. AFL++ and honggfuzz both offer a loop inside the target that processes many inputs per process. Where the harness is written for it, throughput between the three engines on the same target is much closer than the model difference suggests. The Clang and AFL++ documentation both recommend persistent mode for exactly this reason. No ranking is given here because the figures vary with target and hardware and no primary source gives a general number.
The same harness for all three
The LLVMFuzzerTestOneInput convention has become the common interface, so one harness can build for each engine by changing the build line.
#include <stdint.h>
#include <stddef.h>
#include "tlv.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
tlv_parse(data, size);
return 0;
}For libFuzzer, the compiler flag supplies main:
clang-19 -g -O1 -fsanitize=fuzzer,address,undefined harness.c tlv.c -o fuzz_libfuzzer
./fuzz_libfuzzer corpusAFL++ supports the same function through its compiler wrapper, which links its driver and a persistent loop around LLVMFuzzerTestOneInput when you pass -fsanitize=fuzzer:
AFL_USE_ASAN=1 AFL_USE_UBSAN=1 afl-clang-fast -g -O1 -fsanitize=fuzzer harness.c tlv.c -o fuzz_afl
afl-fuzz -i corpus -o out -m none -- ./fuzz_aflhonggfuzz ships a compiler wrapper and a runtime library that drives the same entry point, and it takes the input file from the command line:
hfuzz-clang -g -O1 -fsanitize=address harness.c tlv.c -o fuzz_honggfuzz -lhfuzz
honggfuzz -i corpus -W workdir -- ./fuzz_honggfuzz ___FILE___The ___FILE___ placeholder, with three underscores each side, is replaced by the path of the current input. Check each project's README for the exact flags in your installed version, because wrappers and options change between releases. The point is that a single harness source builds for all three, which lets you run the engines side by side on the same corpus.
Binary-only targets and closed-source code
If you lack the source, the options narrow. AFL++ is the clear choice: QEMU mode emulates the binary and adds coverage instrumentation, and Frida mode instruments it with dynamic binary instrumentation, both at the cost of speed compared to a compiled-in build. libFuzzer cannot instrument code it cannot recompile. honggfuzz can run uninstrumented binaries with hardware-counter feedback on supported processors, which gives coarse coverage but needs no recompile.
Mutators and structure
All three use similar byte-level mutations: bit flips, byte substitution with interesting values, arithmetic, block insertion, deletion, duplication and splicing. They differ in extensibility. libFuzzer lets you define a custom mutator and crossover in C or C++ inside the harness, which suits formats where a checksum or length must be repaired after mutation. AFL++ loads custom mutators as shared libraries or Python modules, so they can be written without touching the target. Structure-aware approaches, such as mutating a protobuf message instead of bytes, are built on libFuzzer's custom mutator hook through the libprotobuf-mutator project, which is the best-supported path for typed input.
Running them in parallel
For a long campaign you want every core busy. libFuzzer parallelizes with -fork=N, which runs child workers and survives their crashes, or with -jobs and -workers, but each worker keeps its own corpus view and you merge periodically with -merge=1. AFL++ has the most mature built-in answer: one -M main instance and any number of -S secondary instances sync queues through the shared output directory automatically. honggfuzz runs multiple threads inside one process tree, with a shared corpus, so a single command uses all cores.
Crash handling and triage
All three save the failing input and report the sanitizer output. honggfuzz groups crashes by a stack hash and keeps a separate file per unique crash. AFL++ marks the signal and the source queue entry in each file name, and libFuzzer writes crash-<hash>, timeout-<hash> and oom-<hash> into the artifact directory. For all of them, the sanitizer's SUMMARY: line is the practical deduplication key, and the triage post in this series shows how to group on it.
Which to choose
| Situation | Pick | Reason |
|---|---|---|
| Library with a clean parse function, source available | libFuzzer | Simplest harness, fastest loop, widest tooling |
| Existing command-line tool that reads a file | AFL++ | No harness needed, mature forkserver |
| Closed-source binary | AFL++ in QEMU or Frida mode | Only engine with solid binary-only modes |
| Need to scale on one many-core machine with minimal setup | honggfuzz | One command, multi-threaded |
| Checksums or magic compares block progress | AFL++ with CMPLOG, or libFuzzer with a custom mutator | Both can bypass comparison gates |
| Project continuously fuzzed on OSS-Fuzz | libFuzzer plus AFL++ | The service runs several engines on the same targets |
| Typed or structured input | libFuzzer with libprotobuf-mutator | Best-supported structure-aware path |
When two rows fit, run both on the same corpus. Engines make different choices about scheduling and mutation, so each finds some bugs the other misses, and OSS-Fuzz runs multiple engines for that reason. Sharing a corpus is just copying files between the two directories and merging.
What the choice does not change
No engine rescues a bad harness. A target that is slow, non-deterministic or stateful gives poor results on every engine, and a build without sanitizers finds only crashes on all of them. The work that decides results is the same: realistic seeds, dictionaries for the tokens of the format, fixing the gates that block coverage, and triaging findings quickly. Spend your first day on the harness and the sanitizer build, and treat the engine as a setting you can change later.


