TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AFLplusplus/AFLplusplus/llms.txt
Use this file to discover all available pages before exploring further.
afl-c++ wrapper is a C++-specific version of afl-cc that automatically uses C++ compilers (g++ or clang++).
Synopsis
Description
afl-c++ is identical to afl-cc but defaults to C++ compilation. It automatically:
- Uses
g++orclang++instead ofgcc/clang - Handles C++ standard library linking
- Supports C++-specific instrumentation
Usage
All options and environment variables from afl-cc apply toafl-c++.
Basic Example
With Specific C++ Standard
Custom C++ Compiler
C++ Specific Considerations
Exception Handling
AFL++ instruments exception handling code. For performance-critical fuzzing:RTTI (Runtime Type Information)
Disable if not needed:Templates and Inline Functions
LTO mode provides better instrumentation for heavily templated code:Coverage Macros in C++
Selective Coverage in C++
Use the__AFL_COVERAGE() macro:

