From 68d04839686b9c4eeff4068f081af6cb5546198f Mon Sep 17 00:00:00 2001 From: gnezdo Date: Fri, 28 Apr 2023 12:03:49 +0000 Subject: [PATCH] Enable kernel-address sanitizer for clang openbsd target OK deraadt@ --- gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp index 1577f70aad6..12e8edb21e0 100644 --- a/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp +++ b/gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp @@ -248,6 +248,10 @@ SanitizerMask OpenBSD::getSupportedSanitizers() const { Res |= SanitizerKind::FuzzerNoLink; } + if (IsX86_64) { + Res |= SanitizerKind::KernelAddress; + } + return Res; } -- 2.20.1