[PATCH] D98286: [Driver] Enable kernel address and memory sanitizers on FreeBSD

Mark Johnston via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 24 07:07:14 PDT 2021


markj updated this revision to Diff 332974.
markj added a comment.

Enable the memory sanitizer too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98286/new/

https://reviews.llvm.org/D98286

Files:
  clang/lib/Driver/ToolChains/FreeBSD.cpp


Index: clang/lib/Driver/ToolChains/FreeBSD.cpp
===================================================================
--- clang/lib/Driver/ToolChains/FreeBSD.cpp
+++ clang/lib/Driver/ToolChains/FreeBSD.cpp
@@ -485,8 +485,11 @@
     Res |= SanitizerKind::Fuzzer;
     Res |= SanitizerKind::FuzzerNoLink;
   }
-  if (IsX86_64)
+  if (IsX86_64) {
+    Res |= SanitizerKind::KernelAddress;
+    Res |= SanitizerKind::KernelMemory;
     Res |= SanitizerKind::Memory;
+  }
   return Res;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98286.332974.patch
Type: text/x-patch
Size: 484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210324/49c9bf7a/attachment.bin>


More information about the cfe-commits mailing list