This is an archive of the discontinued LLVM Phabricator instance.

Add runtime test for -fsanitizer-coverage=control-flow
AcceptedPublic

Authored by Navidem on Sep 6 2022, 5:12 PM.

Details

Reviewers
vitalybuka
kcc

Diff Detail

Unit TestsFailed

Event Timeline

Navidem created this revision.Sep 6 2022, 5:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2022, 5:12 PM
Herald added a subscriber: Enna1. · View Herald Transcript
Navidem requested review of this revision.Sep 6 2022, 5:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2022, 5:12 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
MaskRay added a subscriber: MaskRay.Sep 6 2022, 5:17 PM

The test change should be merged into the patch which introduces the feature.

vitalybuka added inline comments.Sep 6 2022, 5:24 PM
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp
46

please add a new line

The test change should be merged into the patch which introduces the feature.

I asked to extracted it suspecting that this will need few reverts before making green some unusual bots

Navidem updated this revision to Diff 458335.Sep 6 2022, 5:58 PM

Use FileCheck

Navidem updated this revision to Diff 458336.Sep 6 2022, 6:01 PM

Fix new line

Navidem marked an inline comment as done.Sep 6 2022, 6:01 PM
vitalybuka accepted this revision.Sep 6 2022, 10:03 PM
This revision is now accepted and ready to land.Sep 6 2022, 10:03 PM
Navidem updated this revision to Diff 459154.Sep 9 2022, 11:53 AM

Adjust test to use __sanitizer_cov_cfs_init

vitalybuka added inline comments.Sep 9 2022, 2:13 PM
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp
12

It's even better, using __sanitizer_cov_cfs_init

you actually can print out structure of the cfs_beg in some humane readable form

FN ###
  BLOCK ###
   BRACH ###
  BLOCK ###
  BLOCK ###