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

Kostya Serebryany via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 16:16:23 PDT 2022


kcc added inline comments.


================
Comment at: clang/docs/SanitizerCoverage.rst:382
+  void __sanitizer_cov_cfs_init(const uintptr_t *cfs_beg,
+                                const uintptr_t *cfs_end) {
+    // [cfs_beg,cfs_end) is the array of ptr-sized integers representing
----------------
vitalybuka wrote:
> vitalybuka wrote:
> > we can also generate normal structs, per function, and pass them into __sanitizer_cov_cfs_init(const MyStruct* begin, const MyStruct* end);
> > this was can avoid  this magic encoding completely?
> Works for me either way. @kcc WDYT? 
The struct will still have some variable length arrays, right?
Will it be any better?

MyStruct will have to be defined there, and there is no header file for sancov for users to include, and I don't think I want one.


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