From: Peter Collingbourne Date: Tue, 20 Nov 2018 01:01:49 +0000 (+0000) Subject: Driver: SCS is compatible with every other sanitizer. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5e19658a299f9f669522383b661fa051abe229b;p=platform%2Fupstream%2Fllvm.git Driver: SCS is compatible with every other sanitizer. Because SCS relies on system-provided runtime support, we can use it together with any other sanitizer simply by linking the runtime for the other sanitizer. Differential Revision: https://reviews.llvm.org/D54735 llvm-svn: 347282 --- diff --git a/clang/lib/Driver/SanitizerArgs.cpp b/clang/lib/Driver/SanitizerArgs.cpp index 135adb5..fe71b6c 100644 --- a/clang/lib/Driver/SanitizerArgs.cpp +++ b/clang/lib/Driver/SanitizerArgs.cpp @@ -376,12 +376,9 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, KernelAddress | Efficiency), std::make_pair(SafeStack, Address | HWAddress | Leak | Thread | Memory | KernelAddress | Efficiency), - std::make_pair(ShadowCallStack, Address | HWAddress | Leak | Thread | - Memory | KernelAddress | Efficiency | - SafeStack), std::make_pair(KernelHWAddress, Address | HWAddress | Leak | Thread | Memory | KernelAddress | Efficiency | - SafeStack | ShadowCallStack), + SafeStack), std::make_pair(KernelMemory, Address | HWAddress | Leak | Thread | Memory | KernelAddress | Efficiency | Scudo | SafeStack)}; diff --git a/clang/test/Driver/sanitizer-ld.c b/clang/test/Driver/sanitizer-ld.c index ca16932..9ce0599 100644 --- a/clang/test/Driver/sanitizer-ld.c +++ b/clang/test/Driver/sanitizer-ld.c @@ -588,7 +588,7 @@ // RUN: %clang -fsanitize=shadow-call-stack %s -### -o %t.o 2>&1 \ // RUN: -fsanitize=safe-stack -target x86_64-unknown-linux -fuse-ld=ld \ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-SAFESTACK %s -// CHECK-SHADOWCALLSTACK-SAFESTACK: error: invalid argument '-fsanitize=shadow-call-stack' not allowed with '-fsanitize=safe-stack' +// CHECK-SHADOWCALLSTACK-SAFESTACK-NOT: error: // RUN: %clang -fsanitize=cfi -fsanitize-stats %s -### -o %t.o 2>&1 \ // RUN: -target x86_64-unknown-linux -fuse-ld=ld \