Debug Info for Symbolification on Darwin using Address Sanitizer?

Hi All,

What additional switches should be added to get a good trace below? Or
do I need to post-process the output?

Under gdb, I have symbols with -g3.

$export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/clang/3.3/lib/darwin/
$ ./testlib
...

crypt/sha2.c:342:37: runtime error: left shift of 128 by 24 places
cannot be represented in type 'int'

Hi Jeffrey,

You need to export the ASAN_SYMBOLIZER_PATH env var that'll point to
the llvm-symbolizer binary (must reside in the same dir as Clang)
Otherwise you can post-process the output using the
compiler-rt/lib/asan/scripts/asan_symbolize.py script.

HTH,
Alex

Hi Jeffrey,

You need to export the ASAN_SYMBOLIZER_PATH env var that'll point to
the llvm-symbolizer binary (must reside in the same dir as Clang)
Otherwise you can post-process the output using the
compiler-rt/lib/asan/scripts/asan_symbolize.py script.

Thanks Alexander.

Because I was working on Mac OS X, I searched for 'symbolicate' [1] (I
think that's what the Apple folks call it). It had nearly no hits, and
missed the instructions at
http://code.google.com/p/address-sanitizer/source/browse/wiki/AddressSanitizer.wiki?r=1278
completely.

Thanks again.

Jeff

[1] Google

Hi Jeffrey,

You need to export the ASAN_SYMBOLIZER_PATH env var that'll point to
the llvm-symbolizer binary (must reside in the same dir as Clang)
Otherwise you can post-process the output using the
compiler-rt/lib/asan/scripts/asan_symbolize.py script.

I just fetched the 3.3 soures agin. It appears `make install` does not
install the component:

  clang-llvm-3.3-src$ find . -name asan_symbolize.py
  ./llvm-3.3.src/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py

When I built/installed Clang (and compiler-rt), I configured with:

  $ ./configure --enable-optimized --prefix=/usr/local

Was I missing a configure flag?

Jeff

Hi Jeffrey,

You need to export the ASAN_SYMBOLIZER_PATH env var that'll point to
the llvm-symbolizer binary (must reside in the same dir as Clang)
Otherwise you can post-process the output using the
compiler-rt/lib/asan/scripts/asan_symbolize.py script.

For completeness: http://llvm.org/bugs/show_bug.cgi?id=16767.

For others who stumble upon the thread, the docs that mention
asan_symbolize.py are at AddressSanitzer project page [0], and not
part of Clang's documentation.

Jeff

[0] http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer