Skip to content

Commit 1347b23

Browse files
authored
[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.
1 parent 82a7832 commit 1347b23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,8 @@ SanitizerMask ToolChain::getSupportedSanitizers() const {
16391639
Res |= SanitizerKind::ShadowCallStack;
16401640
if (getTriple().isAArch64(64))
16411641
Res |= SanitizerKind::MemTag;
1642+
if (getTriple().isBPF())
1643+
Res |= SanitizerKind::KernelAddress;
16421644
return Res;
16431645
}
16441646

0 commit comments

Comments
 (0)