[PATCH] D65715: [Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 4 21:31:14 PDT 2019
phosek updated this revision to Diff 213280.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65715/new/
https://reviews.llvm.org/D65715
Files:
clang/lib/Driver/SanitizerArgs.cpp
clang/test/Driver/fsanitize-coverage.c
Index: clang/test/Driver/fsanitize-coverage.c
===================================================================
--- clang/test/Driver/fsanitize-coverage.c
+++ clang/test/Driver/fsanitize-coverage.c
@@ -118,8 +118,8 @@
// CLANG-CL-COVERAGE: -fsanitize=address
// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fsanitize-coverage=trace-pc-guard %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VS-SAFESTACK
+// CHECK-VS-SAFESTACK: -fsanitize-coverage-trace-pc-guard
// CHECK-VS-SAFESTACK: -fsanitize=safe-stack
-// CHECK-VS-SAFESTACK-NOT: -fsanitize-coverage-trace-pc-guard
// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fsanitize-coverage=trace-pc-guard -fno-sanitize=safe-stack %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SAFESTACK
// CHECK-NO-SAFESTACK-NOT: error:
@@ -128,3 +128,15 @@
// CHECK-NO-SAFESTACK-NOT: unknown argument
// CHECK-NO-SAFESTACK-NOT: -fsanitize=safe-stack
// CHECK-NO-SAFESTACK: -fsanitize-coverage-trace-pc-guard
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=shadow-call-stack -fsanitize-coverage=trace-pc-guard %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VS-SHADOWCALLSTACK
+// CHECK-VS-SHADOWCALLSTACK: -fsanitize-coverage-trace-pc-guard
+// CHECK-VS-SHADOWCALLSTACK: -fsanitize=shadow-call-stack
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=shadow-call-stack -fsanitize-coverage=trace-pc-guard -fno-sanitize=shadow-call-stack %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SAFESTACK
+// CHECK-NO-SHADOWCALLSTACK-NOT: error:
+// CHECK-NO-SHADOWCALLSTACK-NOT: warning:
+// CHECK-NO-SHADOWCALLSTACK-NOT: argument unused
+// CHECK-NO-SHADOWCALLSTACK-NOT: unknown argument
+// CHECK-NO-SHADOWCALLSTACK-NOT: -fsanitize=shadow-call-stack
+// CHECK-NO-SHADOWCALLSTACK: -fsanitize-coverage-trace-pc-guard
Index: clang/lib/Driver/SanitizerArgs.cpp
===================================================================
--- clang/lib/Driver/SanitizerArgs.cpp
+++ clang/lib/Driver/SanitizerArgs.cpp
@@ -46,7 +46,8 @@
SanitizerKind::Undefined | SanitizerKind::Integer |
SanitizerKind::ImplicitConversion | SanitizerKind::Nullability |
SanitizerKind::DataFlow | SanitizerKind::Fuzzer |
- SanitizerKind::FuzzerNoLink | SanitizerKind::FloatDivideByZero;
+ SanitizerKind::FuzzerNoLink | SanitizerKind::FloatDivideByZero |
+ SanitizerKind::SafeStack | SanitizerKind::ShadowCallStack;
static const SanitizerMask RecoverableByDefault =
SanitizerKind::Undefined | SanitizerKind::Integer |
SanitizerKind::ImplicitConversion | SanitizerKind::Nullability |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65715.213280.patch
Type: text/x-patch
Size: 2571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190805/9d9f72e3/attachment.bin>
More information about the cfe-commits
mailing list