[PATCH] D133157: Add -fsanitizer-coverage=control-flow

Vitaly Buka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 14 14:35:03 PDT 2022


vitalybuka added inline comments.


================
Comment at: compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp:15
+extern "C" void __sanitizer_cov_cfs_init(const uintptr_t *cfs_beg,
+                                         const uintptr_t *cfs_end) {
+  CFS_BEG = (uintptr_t *)cfs_beg;
----------------
Navidem wrote:
> vitalybuka wrote:
> > vitalybuka wrote:
> > > would you like to add some printing function as for other coverage types?
> > actually printing can be don't in follow up patch, but it may simplify the test, you will not need iterate it in the test.
> > actually printing can be don't in follow up patch, but it may simplify the test, you will not need iterate it in the test.
> 
> I'm not sure I follow what you are suggesting.
Check this out D108405
then you can hook your data into DumpCoverage() 
then you can replace entire "while (pt < CFS_END) {" loop with set of CHECK:


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133157/new/

https://reviews.llvm.org/D133157



More information about the cfe-commits mailing list