Hi!

I have posted yesterday a patch to fix data symbolization using
libbacktrace, this patch is a backport of the change I've sent upstream
that has been committed today.

2014-12-16  Jakub Jelinek  <ja...@redhat.com>

        * sanitizer_common/sanitizer_symbolizer_libbacktrace.cc,
        sanitizer_common/sanitizer_symbolizer_libbacktrace.h,
        sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc: Cherry pick
        upstream r224308.

--- libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc  
(revision 218777)
+++ libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc  
(working copy)
@@ -165,9 +165,9 @@ uptr LibbacktraceSymbolizer::SymbolizeCo
   return data.n_frames;
 }
 
-bool LibbacktraceSymbolizer::SymbolizeData(DataInfo *info) {
-  backtrace_syminfo((backtrace_state *)state_, info->start,
-                    SymbolizeDataCallback, ErrorCallback, info);
+bool LibbacktraceSymbolizer::SymbolizeData(uptr addr, DataInfo *info) {
+  backtrace_syminfo((backtrace_state *)state_, addr, SymbolizeDataCallback,
+                    ErrorCallback, info);
   return true;
 }
 
@@ -185,7 +185,7 @@ uptr LibbacktraceSymbolizer::SymbolizeCo
   return 0;
 }
 
-bool LibbacktraceSymbolizer::SymbolizeData(DataInfo *info) {
+bool LibbacktraceSymbolizer::SymbolizeData(uptr addr, DataInfo *info) {
   return false;
 }
 
--- libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h   
(revision 218777)
+++ libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.h   
(working copy)
@@ -33,7 +33,7 @@ class LibbacktraceSymbolizer {
   uptr SymbolizeCode(uptr addr, AddressInfo *frames, uptr max_frames,
                      const char *module_name, uptr module_offset);
 
-  bool SymbolizeData(DataInfo *info);
+  bool SymbolizeData(uptr addr, DataInfo *info);
 
   // May return NULL if demangling failed.
   static char *Demangle(const char *name, bool always_alloc = false);
--- libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc 
(revision 218777)
+++ libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc 
(working copy)
@@ -593,7 +593,7 @@ class POSIXSymbolizer : public Symbolize
     // First, try to use libbacktrace symbolizer (if it's available).
     if (libbacktrace_symbolizer_ != 0) {
       mu_.CheckLocked();
-      if (libbacktrace_symbolizer_->SymbolizeData(info))
+      if (libbacktrace_symbolizer_->SymbolizeData(addr, info))
         return true;
     }
     const char *str = SendCommand(true, module_name, module_offset);

        Jakub

Reply via email to