Right now, Addr2Line symbolizer in asan_symbolize.py doesn't support inline functions symbolization. This might be a useful feature for using ASan on embedded systems.
Test results:
$ cat test.c
#include <sanitizer/common_interface_defs.h>
static inline void FooBarBaz() {
__sanitizer_print_stack_trace();
}
int main() {
FooBarBaz(); return 0;
}
$ clang test.c -fsanitize=address -g -O2 -o test.x && ./test.x &> /tmp/test.log
$ ./projects/compiler-rt/lib/asan/scripts/asan_symbolize.py -l /tmp/test.log
#0 0x42095e in __sanitizer_print_stack_trace _asan_rtl_ #1 0x4cec07 in FooBarBaz /home/max/build/llvm/asan/test.c:4 #2 0x4cec07 in main /home/max/build/llvm/asan/test.c:8 #3 0x7f89f0891ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
Perhaps make short version for 32-bit targets? Same for C++ code below.