[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 10:18:12 PST 2023
================
@@ -80,14 +80,17 @@ 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, (symbolized ? info.module : ""), g.has_dynamic_init,
----------------
aeubanks wrote:
I think we should print "?" if we didn't symbolize to be more explicit. Otherwise just avoid printing `module=` at all
https://github.com/llvm/llvm-project/pull/71879
More information about the llvm-commits
mailing list