This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3e52c0926c22: Add -fsanitizer-coverage=control-flow
(authored by Navidem, committed by vitalybuka).
Repository:
rG LLVM Github Monorepo
CHANGES S
vitalybuka added inline comments.
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:155
+cl::desc("collect control flow for each function"), cl::Hidden,
+cl::init(false));
+
MaskRay wrote:
> false can be removed
vitalybuka updated this revision to Diff 460525.
vitalybuka added a comment.
clang test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Basi
MaskRay accepted this revision.
MaskRay added inline comments.
Herald added a subscriber: StephenFan.
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:155
+cl::desc("collect control flow for each function"), cl::Hidden,
+cl::in
vitalybuka updated this revision to Diff 460518.
vitalybuka added a comment.
clang-format
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Ba
Navidem added a comment.
Thanks @kcc @vitalybuka, I do not have commit access.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
___
cfe-commits mailing list
cfe-
kcc accepted this revision.
kcc added a comment.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
Navidem marked 3 inline comments as done.
Navidem 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,
+ c
Navidem updated this revision to Diff 460251.
Navidem added a comment.
Use CHECK-DAG and separate function for checking.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCovera
kcc added inline comments.
Comment at:
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp:24
+int main() {
+ int (*main_ptr)() = &main;
+ void (*foo_ptr)(int) = &foo;
syntax nit:
auto main_ptr = &main
Comment a
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 =
Navidem marked an inline comment as done.
Navidem 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,
+ c
Navidem updated this revision to Diff 460232.
Navidem added a comment.
Enhance rt test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Basi
vitalybuka accepted this revision.
vitalybuka added a comment.
This revision is now accepted and ready to land.
LGTM as-is
Comment at:
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp:15
+extern "C" void __sanitizer_cov_cfs_init(const uintptr_t *
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 =
Navidem updated this revision to Diff 460215.
Navidem added a comment.
Update the rt test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Ba
kcc added inline comments.
Comment at:
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_control_flow.cpp:1
+// Tests -fsanitize-coverage=control-flow.
+
I suggest to make this test smaller:
* foo() can by empty (but avoid inlining)
* main() can hav
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
--
Navidem added inline comments.
Comment at: clang/lib/Driver/SanitizerArgs.cpp:814
(CoverageTracePC | CoverageTracePCGuard | CoverageInline8bitCounters |
- CoverageInlineBoolFlag))
+ CoverageInlineBoolFlag | CoverageControlFlow))
CoverageFeatures |=
Navidem updated this revision to Diff 459201.
Navidem added a comment.
Bring back the runtime test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/includ
vitalybuka 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 added a comment.
we need to update
llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_coverage_interface.inc
llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h
you can search by __sanitizer_cov_8bit_counters_init if anything missing
Something like Single
vitalybuka 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
---
Navidem marked an inline comment as done and an inline comment as not done.
Navidem added inline comments.
Comment at: clang/lib/Driver/SanitizerArgs.cpp:807
<< "-fsanitize-coverage=[func|bb|edge]"
-<< "-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace-pc]
Navidem updated this revision to Diff 459157.
Navidem added a comment.
Update doc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Basic/Code
Navidem updated this revision to Diff 458958.
Navidem added a comment.
Add __sanitizer_cov_cfs_init
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/includ
vitalybuka added inline comments.
Comment at: clang/lib/Driver/SanitizerArgs.cpp:807
<< "-fsanitize-coverage=[func|bb|edge]"
-<< "-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace-pc]";
+<<
"-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace
Navidem updated this revision to Diff 458321.
Navidem added a comment.
Apply comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133157/new/
https://reviews.llvm.org/D133157
Files:
clang/docs/SanitizerCoverage.rst
clang/include/clang/Basic
28 matches
Mail list logo