forked from OSchip/llvm-project
[Driver] Add SafeStack to a map of incompatible sanitizers
This allows reporting an error when user tries to use SafeStack with incompatible sanitizers. Differential Revision: https://reviews.llvm.org/D43606 llvm-svn: 326151
This commit is contained in:
parent
d2af423bbe
commit
a459dab937
|
@ -378,7 +378,9 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
|
|||
std::make_pair(Efficiency, Address | HWAddress | Leak | Thread | Memory |
|
||||
KernelAddress),
|
||||
std::make_pair(Scudo, Address | HWAddress | Leak | Thread | Memory |
|
||||
KernelAddress | Efficiency)};
|
||||
KernelAddress | Efficiency),
|
||||
std::make_pair(SafeStack, Address | HWAddress | Leak | Thread | Memory |
|
||||
KernelAddress | Efficiency)};
|
||||
for (auto G : IncompatibleGroups) {
|
||||
SanitizerMask Group = G.first;
|
||||
if (Kinds & Group) {
|
||||
|
|
|
@ -526,7 +526,7 @@
|
|||
// NOSP-NOT: "-fsanitize=safe-stack"
|
||||
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP-ASAN
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN
|
||||
// RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||
// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
|
@ -534,14 +534,11 @@
|
|||
// RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP
|
||||
// NO-SP-NOT: stack-protector
|
||||
// NO-SP: "-fsanitize=safe-stack"
|
||||
// SP-ASAN: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address'
|
||||
// SP: "-fsanitize=safe-stack"
|
||||
// SP: -stack-protector
|
||||
// NO-SP-NOT: stack-protector
|
||||
|
||||
// NO-SP-ASAN-NOT: stack-protector
|
||||
// NO-SP-ASAN: "-fsanitize=address,safe-stack"
|
||||
// NO-SP-ASAN-NOT: stack-protector
|
||||
|
||||
// RUN: %clang -target powerpc64-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM
|
||||
// RUN: %clang -target powerpc64le-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM
|
||||
// CHECK-SANM: "-fsanitize=memory"
|
||||
|
|
Loading…
Reference in New Issue