gopalshankar / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

llvm-symbolizer fails to symbolize _start #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
_start typically has a size of 0 in the symbol table, and does not have any 
debug information associated with it.

asan_symbolize.py (i.e., addr2line) can deal with it:

    #0 0x7f5c9c272d10 in main /home/eugenis/1.cc:4
    #1 0x7f5c9b07776c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
    #2 0x7f5c9c2728b8 in _start ??:0

Internal symbolizer (via (A|M)SAN_SYMBOLIZER_PATH) can not:
    #0 0x7f1c31f16d10 in main /home/eugenis/test/1.cc:4
    #1 0x7f1c30d1b76c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
    #2 0x7f1c31f168b8 (/home/eugenis/test/1+0x58b8)

Original issue reported on code.google.com by euge...@google.com on 20 Feb 2013 at 2:10

GoogleCodeExporter commented 9 years ago
Symbolizing _start should work after r183213:

$ ./bin/clang++ -fsanitize=address -g 
llvm/projects/compiler-rt/lib/asan/lit_tests/use-after-free.cc
$ ./a.out 
=================================================================
==26740==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200000eff5 
at pc 0x428ec3 bp 0x7fff64ad63b0 sp 0x7fff64ad63a8
READ of size 1 at 0x60200000eff5 thread T0
    #0 0x428ec2 in main /usr/local/google/llvm/projects/compiler-rt/lib/asan/lit_tests/use-after-free.cc:22
    #1 0x7f5f4aa4176c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c)
    #2 0x428c54 in _start (/usr/local/google/llvm_build_clang/a.out+0x428c54)
<...>

Original comment by samso...@google.com on 4 Jun 2013 at 8:03

GoogleCodeExporter commented 9 years ago
Note that to symbolize __libc_start_main we should understand .gnu_debuglink 
section (there's issue 169 for that)

Original comment by samso...@google.com on 4 Jun 2013 at 8:05