Allow -fsanitize=kcfi to be enabled with -fsanitize-coverage= modes
such as trace-{pc,cmp}.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
clang/test/CodeGen/sanitize-coverage.c | ||
---|---|---|
92 | One call void @__sanitizer_cov_trace is probably sufficient. | |
94 | %c() {{.}} matches one byte. Just write the byte. |
Addressed feedback.
clang/test/CodeGen/sanitize-coverage.c | ||
---|---|---|
94 |
I do want to match just one byte, but the actual byte changes depending on how many statements there are in the function, so matching any byte seems less fragile. %c would match literally just %c. Am I missing some neat FileCheck trick here that would save me a ton of typing in future...? |
clang/test/CodeGen/sanitize-coverage.c | ||
---|---|---|
94 | Ah, ok, it's an unnamed value. [[#]] can match %1 %2 ... |
One call void @__sanitizer_cov_trace is probably sufficient.