[PATCH] D64488: [Driver] Support -fsanitize=function on Solaris/x86
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 13:07:31 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367351: [Driver] Support -fsanitize=function on Solaris/x86 (authored by ro, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D64488?vs=212393&id=212420#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64488/new/
https://reviews.llvm.org/D64488
Files:
cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
cfe/trunk/test/Driver/fsanitize.c
Index: cfe/trunk/test/Driver/fsanitize.c
===================================================================
--- cfe/trunk/test/Driver/fsanitize.c
+++ cfe/trunk/test/Driver/fsanitize.c
@@ -727,6 +727,9 @@
// RUN: %clang -target x86_64--netbsd -fsanitize=scudo %s -### 2>&1 | FileCheck %s -check-prefix=SCUDO-NETBSD
// SCUDO-NETBSD: "-fsanitize=scudo"
+// RUN: %clang -target i386--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS
+// RUN: %clang -target x86_64--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS
+// FUNCTION-SOLARIS: "-fsanitize=function"
// RUN: %clang -target x86_64-scei-ps4 -fsanitize=function -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-UBSAN-PS4
Index: cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
@@ -177,6 +177,7 @@
SanitizerMask Solaris::getSupportedSanitizers() const {
const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
+ const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
SanitizerMask Res = ToolChain::getSupportedSanitizers();
// FIXME: Omit X86_64 until 64-bit support is figured out.
if (IsX86) {
@@ -184,6 +185,8 @@
Res |= SanitizerKind::PointerCompare;
Res |= SanitizerKind::PointerSubtract;
}
+ if (IsX86 || IsX86_64)
+ Res |= SanitizerKind::Function;
Res |= SanitizerKind::Vptr;
return Res;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64488.212420.patch
Type: text/x-patch
Size: 1578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190730/d38d372b/attachment.bin>
More information about the cfe-commits
mailing list