Skip to content

Glossary

AddressSanitizer (ASan)

A compiler instrumentation and runtime that detects out-of-bounds accesses, use-after-free and double free at the exact faulting instruction.

AddressSanitizer (ASan) is a memory-error detector built into Clang, GCC and MSVC and enabled with -fsanitize=address. It maps application memory to shadow memory, surrounds heap, stack and global objects with poisoned redzones, and delays reuse of freed memory in a quarantine. Every load and store is checked, so a bug that would silently corrupt memory produces an immediate report with the access, allocation and free stack traces.

ASan typically costs around twice the CPU time and two to three times the memory, which makes it ideal for tests, CI and fuzzing rather than production. See AddressSanitizer, UBSan and friends.