Enable kernel-address sanitizer for clang openbsd target
authorgnezdo <gnezdo@openbsd.org>
Fri, 28 Apr 2023 12:03:49 +0000 (12:03 +0000)
committergnezdo <gnezdo@openbsd.org>
Fri, 28 Apr 2023 12:03:49 +0000 (12:03 +0000)
OK deraadt@

gnu/llvm/clang/lib/Driver/ToolChains/OpenBSD.cpp

index 1577f70..12e8edb 100644 (file)
@@ -248,6 +248,10 @@ SanitizerMask OpenBSD::getSupportedSanitizers() const {
     Res |= SanitizerKind::FuzzerNoLink;
   }
 
+  if (IsX86_64) {
+    Res |= SanitizerKind::KernelAddress;
+  }
+
   return Res;
 }