forked from OSchip/llvm-project
Enable SafeStack on all Linux platforms.
llvm-svn: 248518
This commit is contained in:
parent
8535c6c278
commit
299238a67b
|
@ -3800,6 +3800,7 @@ SanitizerMask Linux::getSupportedSanitizers() const {
|
||||||
Res |= SanitizerKind::Address;
|
Res |= SanitizerKind::Address;
|
||||||
Res |= SanitizerKind::KernelAddress;
|
Res |= SanitizerKind::KernelAddress;
|
||||||
Res |= SanitizerKind::Vptr;
|
Res |= SanitizerKind::Vptr;
|
||||||
|
Res |= SanitizerKind::SafeStack;
|
||||||
if (IsX86_64 || IsMIPS64 || IsAArch64)
|
if (IsX86_64 || IsMIPS64 || IsAArch64)
|
||||||
Res |= SanitizerKind::DataFlow;
|
Res |= SanitizerKind::DataFlow;
|
||||||
if (IsX86_64 || IsMIPS64)
|
if (IsX86_64 || IsMIPS64)
|
||||||
|
@ -3810,7 +3811,6 @@ SanitizerMask Linux::getSupportedSanitizers() const {
|
||||||
Res |= SanitizerKind::Memory;
|
Res |= SanitizerKind::Memory;
|
||||||
if (IsX86 || IsX86_64) {
|
if (IsX86 || IsX86_64) {
|
||||||
Res |= SanitizerKind::Function;
|
Res |= SanitizerKind::Function;
|
||||||
Res |= SanitizerKind::SafeStack;
|
|
||||||
}
|
}
|
||||||
return Res;
|
return Res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,6 +282,8 @@
|
||||||
// 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 -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 -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 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=SP
|
||||||
|
// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP
|
||||||
// SP-NOT: stack-protector
|
// SP-NOT: stack-protector
|
||||||
// SP: "-fsanitize=safe-stack"
|
// SP: "-fsanitize=safe-stack"
|
||||||
// SP-ASAN-NOT: stack-protector
|
// SP-ASAN-NOT: stack-protector
|
||||||
|
|
Loading…
Reference in New Issue