[PATCH] D138458: [Clang][Driver] Add KCFI to SupportsCoverage
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 21 13:37:27 PST 2022
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
> with -fsanitize=trace-{pc,cmp}.
`-fsanitize-coverage=` modes such as `trace-{pc,cmp}`.
(a) It's `-fsanitize-coverage=`, not `-fsanitize-coverage=trace-{pc,cmp}`.
(b) ` -fsanitize=trace-{pc,cmp}` may feel that they are the only modes, but SanitizerCoverage has much more modes than the mentioned two.
================
Comment at: clang/test/CodeGen/sanitize-coverage.c:92
+void test_no_sanitize_kcfi(void) {
+ // CHECK-NOT: call void @__sanitizer_cov_trace_pc
+ // CHECK-NOT: call void @__sanitizer_cov_trace_const_cmp
----------------
One `call void @__sanitizer_cov_trace` is probably sufficient.
================
Comment at: clang/test/CodeGen/sanitize-coverage.c:94
+ // CHECK-NOT: call void @__sanitizer_cov_trace_const_cmp
+ // KCFI-NOT: call void %{{.}}() [ "kcfi"(i32 {{.*}}) ]
+ f();
----------------
`%c()`
`{{.}}` matches one byte. Just write the byte.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138458/new/
https://reviews.llvm.org/D138458
More information about the cfe-commits
mailing list