Author: Emil Tsalapatis
Date: 2025-11-18T07:59:10-08:00
New Revision: 1347b23cd6510a4149665616433e8505bb6fc6bc

URL: 
https://github.com/llvm/llvm-project/commit/1347b23cd6510a4149665616433e8505bb6fc6bc
DIFF: 
https://github.com/llvm/llvm-project/commit/1347b23cd6510a4149665616433e8505bb6fc6bc.diff

LOG: [clang][BPF] Turn on AddressSanitizer pass (#167766)

The BPF LLVM target currently doesn't support turning on the
AddressSanitizer pass, either for userspace ASAN or KASAN. Enable the
KASAN option for the BPF target in anticipation of a KASAN
implementation for BPF.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChain.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 5ff7d83946137..77a2c73f0d446 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -1639,6 +1639,8 @@ SanitizerMask ToolChain::getSupportedSanitizers() const {
     Res |= SanitizerKind::ShadowCallStack;
   if (getTriple().isAArch64(64))
     Res |= SanitizerKind::MemTag;
+  if (getTriple().isBPF())
+    Res |= SanitizerKind::KernelAddress;
   return Res;
 }
 


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to