I am trying to debug a memory error detected by clang
with asan
, but missed by valgrind
. But I cannot get my clang
built bina
If we look at the clang
AddressSanitizer documentation it says:
To make AddressSanitizer symbolize its output you need to set the ASAN_SYMBOLIZER_PATH environment variable to point to the llvm-symbolizer binary (or make sure llvm-symbolizer is in your $PATH):
and shows the the following example:
ASAN_SYMBOLIZER_PATH=/usr/local/bin/llvm-symbolizer ./a.out
As the OP noted, the install location may vary, but once you know where llvm-symbolizer
is located the steps are the same.