[llvm-commits] [PATCH] [asan] Always use file+offset in symbolizer
NAKAMURA Takumi
geek4civic at gmail.com
Thu Oct 18 02:32:24 PDT 2012
> Besides, I still want the offsets to be meaningful for addr2line/atos.
#0 0x804a7e6 (projects/compiler-rt/lib/asan/lit_tests/Output/use-after-free.cc.tmp+0x27e6)
Then should the address (0x804a7e6) be taken by them instead of the offset (0x27e6)?
Anyways, I don't know how to distinguish PIE in runtime, though.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h:56
@@ -67,1 +55,3 @@
+ // FIXME: file_offset doesn't make sense if it is not zero.
+ *offset = (addr - start) + file_offset;
return true;
----------------
I guess it is used on both darwin and linux (and possibly android?)
Could we rewrite here conditioned out with; ?
#if defined(__linux__)
*offset = (addr - start) + file_offset;
#else
*offset = (addr - (i ? start : 0)) + file_offset;
#endif
As long as the emission would be handled by Addr2LineSymbolizer.
http://llvm-reviews.chandlerc.com/D66
More information about the llvm-commits
mailing list