This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] print globals in symbolizer-friendly format.
ClosedPublic

Authored by fmayer on Sep 13 2021, 8:40 AM.

Diff Detail

Event Timeline

fmayer requested review of this revision.Sep 13 2021, 8:40 AM
fmayer created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2021, 8:40 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
eugenis accepted this revision.Sep 13 2021, 12:22 PM
eugenis added a subscriber: hctim.

LGTM

My only concern is that an unsuspecting tool will symbolize this as code, not data location. As I understand, these are mostly equivalent when there is no line info for the address, which is the most common case. See the difference between SymbolizableObjectFile::symbolizeCode and symbolizeData. This change looks an improvement.

@hctim FYI

This revision is now accepted and ready to land.Sep 13 2021, 12:22 PM
pcc added a subscriber: pcc.Sep 13 2021, 12:24 PM
pcc added inline comments.
compiler-rt/lib/hwasan/hwasan_report.cpp
356

Should there be a #0 here as well?

fmayer updated this revision to Diff 372712.Sep 15 2021, 8:21 AM

fix format

fmayer marked an inline comment as done.Sep 15 2021, 8:23 AM
This revision was automatically updated to reflect the committed changes.