What problem does it solve?
AddressSanitizer (ASan) helps you detect hard-to-find memory corruption bugs like buffer overflows and use-after-free errors during testing, so crashes become actionable reports instead of mysteries.
Core Features & Use Cases
- Runtime memory error detection for fuzzing: Instruments C/C++ (and some Rust unsafe/FFI paths) to catch illegal memory accesses as they happen.
- Detailed crash diagnostics: Produces stack traces plus allocation/deallocation context to speed up root-cause analysis.
- Fuzzer-focused configuration: Supports common fuzzing workflows (libFuzzer, AFL++, cargo-fuzz, honggfuzz) including practical knobs like verbosity and leak detection.
Use case: You run a fuzz target against a C parser and it occasionally crashes; ASan turns that into a precise report (error type, faulting instruction, and relevant allocation history), letting you fix the vulnerability faster.
Quick Start
Compile your program (or fuzz target) with address instrumentation, then run it with ASAN_OPTIONS set to enable useful diagnostics and (optionally) disable leak detection during fuzzing.