[clang] e87633a - [Driver][OpenBSD] Enable kernel address sanitizer on amd64
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 13 13:48:09 PST 2023
Author: Brad Smith
Date: 2023-11-13T16:47:59-05:00
New Revision: e87633a548a6bf882761e8886804df9064a25fab
URL: https://github.com/llvm/llvm-project/commit/e87633a548a6bf882761e8886804df9064a25fab
DIFF: https://github.com/llvm/llvm-project/commit/e87633a548a6bf882761e8886804df9064a25fab.diff
LOG: [Driver][OpenBSD] Enable kernel address sanitizer on amd64
Added:
Modified:
clang/lib/Driver/ToolChains/OpenBSD.cpp
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/OpenBSD.cpp b/clang/lib/Driver/ToolChains/OpenBSD.cpp
index 798b39ce86badce..5d06cd8ab0bad16 100644
--- a/clang/lib/Driver/ToolChains/OpenBSD.cpp
+++ b/clang/lib/Driver/ToolChains/OpenBSD.cpp
@@ -295,16 +295,15 @@ void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
SanitizerMask OpenBSD::getSupportedSanitizers() const {
const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
-
- // For future use, only UBsan at the moment
SanitizerMask Res = ToolChain::getSupportedSanitizers();
-
if (IsX86 || IsX86_64) {
Res |= SanitizerKind::Vptr;
Res |= SanitizerKind::Fuzzer;
Res |= SanitizerKind::FuzzerNoLink;
}
-
+ if (IsX86_64) {
+ Res |= SanitizerKind::KernelAddress;
+ }
return Res;
}
More information about the cfe-commits
mailing list