This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer coverage] write the pc-table at the process exit
ClosedPublic

Authored by kcc on Sep 20 2021, 6:00 PM.

Details

Summary

The current code writes the pc-table at the process startup,
which may happen before the common_flags() are initialized.
Move writing to the process end.
This is consistent with how we write the counters and avoids the problem with the uninitalized flags.
Add prints if verbosity>=1.

Diff Detail

Event Timeline

kcc requested review of this revision.Sep 20 2021, 6:00 PM
kcc created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 6:00 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
kostik accepted this revision.Sep 20 2021, 9:10 PM
kostik added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
170

nit: spaces instead of tabs?

This revision is now accepted and ready to land.Sep 20 2021, 9:10 PM
This revision was automatically updated to reflect the committed changes.
kcc added inline comments.Sep 21 2021, 9:10 AM
compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cpp
170

weird. my files didn't have tabs.