This is a demo that shows how to configure GCC and Clang to build and run with the address sanitizer instrumented code.
You need the ASAN_OPTIONS=symbolize=1
to turn on resolving addresses in object code to source code line numbers and filenames. This option is implicit for Clang but it won't do any harm.
The recommended way for GCC is to statically link against ASAN using -static-libasan
. See the ldd
output.