[compiler-rt] [asan] Report executable/DSO name for report_globals=2 and odr-violation checking (PR #71879)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 08:11:22 PST 2023


================
@@ -80,14 +80,16 @@ static bool IsAddressNearGlobal(uptr addr, const __asan_global &g) {
 }
 
 static void ReportGlobal(const Global &g, const char *prefix) {
+  DataInfo info;
+  bool symbolized = Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info);
   Report(
-      "%s Global[%p]: beg=%p size=%zu/%zu name=%s module=%s dyn_init=%zu "
+      "%s Global[%p]: beg=%p size=%zu/%zu name=%s source=%s module=%s "
+      "dyn_init=%zu "
       "odr_indicator=%p\n",
       prefix, (void *)&g, (void *)g.beg, g.size, g.size_with_redzone, g.name,
-      g.module_name, g.has_dynamic_init, (void *)g.odr_indicator);
+      g.module_name, info.module, g.has_dynamic_init, (void *)g.odr_indicator);
----------------
aeubanks wrote:

`info.module` might not be valid if `symbolized` is false?

https://github.com/llvm/llvm-project/pull/71879


More information about the llvm-commits mailing list