fsanitizeaddress
fsanitizeaddress is the compiler option -fsanitize=address used to enable AddressSanitizer, a runtime memory error detector included in the Clang/LLVM toolchain and supported by GCC in compatible versions. It instruments C and C++ programs to find a range of memory corruption bugs, including heap- and stack-based buffer overflows, use-after-free, use-after-return, and double-free, by reporting errors when a forbidden memory access occurs.
AddressSanitizer works by instrumenting code and using a separate shadow memory to track the state of application
Usage and limitations: The flag is usually combined with -g for debugging information and with -O1 or
Output and interpretation: When a bug is detected, AddressSanitizer prints a diagnostic message indicating the error