[llvm-commits] [PATCH] [asan] Always use file+offset in symbolizer
Alexey Samsonov
samsonov at google.com
Thu Oct 18 06:05:02 PDT 2012
================
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;
----------------
NAKAMURA Takumi wrote:
> 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.
Yes, this fix should be on Linux only.
================
Comment at: compiler-rt/lib/asan/scripts/asan_symbolize.py:114
@@ +113,3 @@
+
+ def get_base_addr(self):
+ p = subprocess.Popen(
----------------
You'd need the same function for LLVMSymbolizer (see it above in this file). I'd also appreciate the interesting parts of expected "objdump -h" output format in comments, as the regexps are hard to understand at first glance.
http://llvm-reviews.chandlerc.com/D66
More information about the llvm-commits
mailing list