[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:49:02 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL367799: [Driver] Don't disable -fsanitizer-coverage for safe-stack or shadow-call-stack (authored by phosek, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65715?vs=213280&id=213281#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65715/new/

https://reviews.llvm.org/D65715

Files:
  cfe/trunk/lib/Driver/SanitizerArgs.cpp
  cfe/trunk/test/Driver/fsanitize-coverage.c


Index: cfe/trunk/lib/Driver/SanitizerArgs.cpp
===================================================================
--- cfe/trunk/lib/Driver/SanitizerArgs.cpp
+++ cfe/trunk/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 |
Index: cfe/trunk/test/Driver/fsanitize-coverage.c
===================================================================
--- cfe/trunk/test/Driver/fsanitize-coverage.c
+++ cfe/trunk/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65715.213281.patch
Type: text/x-patch
Size: 2595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190805/92c0df7d/attachment.bin>


More information about the cfe-commits mailing list