This is an archive of the discontinued LLVM Phabricator instance.

[HWASan] Clean up hwasan_symbolize.
ClosedPublic

Authored by fmayer on May 5 2022, 11:53 AM.

Details

Summary

The globals are better expressed as members of the Symbolizer, and all
functions operating on it should be methods instead.

Also using the standard idiom of wrapping the main code in
if __name__ == '__main__'.

Diff Detail

Event Timeline

fmayer created this revision.May 5 2022, 11:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 11:53 AM
fmayer published this revision for review.May 5 2022, 11:57 AM
fmayer added a reviewer: eugenis.
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 11:57 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
eugenis accepted this revision.May 5 2022, 1:45 PM

LGTM

compiler-rt/lib/hwasan/scripts/hwasan_symbolize
353–428

I think it would be cleaner to move the code to "main()" and call it here.

This revision is now accepted and ready to land.May 5 2022, 1:45 PM
fmayer updated this revision to Diff 427443.May 5 2022, 2:04 PM

address comment

fmayer marked an inline comment as done.May 5 2022, 2:04 PM
This revision was automatically updated to reflect the committed changes.
fmayer reopened this revision.May 6 2022, 11:14 AM
This revision is now accepted and ready to land.May 6 2022, 11:14 AM
This revision was automatically updated to reflect the committed changes.