MaskRay added a comment.
> Add -sanitizer-coverage-control-flow
Add -fsanitizer-coverage=control-flow
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
___
cfe-c
MaskRay added inline comments.
Comment at: clang/docs/SanitizerCoverage.rst:338
+
+With ``-fsanitize-coverage=control-flow`` the compiler will create a table to
collect
+control flow for each function. More specifically, for each basic block in the
function,
Th
vitalybuka added inline comments.
Comment at:
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp:4
+// RUN: %clangxx -O0 -std=c++11 -fsanitize-coverage=control-flow %s -o %t
+// RUN: %run %t 2>&1 | FileCheck %s --implicit-check-not Assertion{{.*}}fai
Navidem updated this revision to Diff 457754.
Navidem added a comment.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Added an initial run-time test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://revie
Navidem added inline comments.
Comment at: llvm/test/Instrumentation/SanitizerCoverage/control-flow.ll:2
+; Test -sanitizer-coverage-control-flow
+; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3
-sanitizer-coverage-control-flow -S | FileCheck %s
+
---
Navidem added inline comments.
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1055
+ for (auto &BB: F) {
+// blockaddress may not be used on function's entry block.
+if (&BB == &F.getEntryBlock())
Navidem wrote:
> kcc wrote:
> > vi
Navidem updated this revision to Diff 457734.
Navidem added a comment.
Herald added subscribers: cfe-commits, ormris, MaskRay.
Herald added a project: clang.
Updated docs, lit test, and added clang option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.or