[PATCH] Allow -fsanitize-coverage=N with ubsan, clang part
Alexey Samsonov
vonosmas at gmail.com
Mon Jan 5 15:26:41 PST 2015
================
Comment at: lib/Driver/SanitizerArgs.cpp:298
@@ -297,3 +297,3 @@
// Parse -fsanitize-coverage=N. Currently one of asan/msan/lsan is required.
- if (NeedsAsan || NeedsMsan || NeedsLsan) {
+ if (NeedsAsan || NeedsMsan || NeedsLsan || NeedsUbsanRt) {
if (Arg *A = Args.getLastArg(options::OPT_fsanitize_coverage)) {
----------------
samsonov wrote:
> NeedsUbsanRt is a compile-time constant. You probably should use
> needsUbsanRt()
>
> (omg, it's terrible). You may consider adding a test that -fsanitize-coverage=1 is reported as unused argument for, e.g., `-fsanitize=dataflow`
As an alternative, introduce new SanitizeKind
SupportsCoverage = Address | Memory | Leak | Undefined | Integer,
and replace this if with
if (Kinds & SupportsCoverage) { ... }
http://reviews.llvm.org/D6849
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list