[llvm-branch-commits] [clang] [Clang] Add -fsanitize=daddress for Device AddressSanitizer (PR #242444)

Yaxun Liu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 14 03:43:53 PST 2026


================
@@ -9916,6 +9916,11 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
     // Without this check using it on the host would result in linker errors.
     if (requiresUBSanRT(ID) && !HasSanitizerRT)
       return false;
+    // The device sanitizer has a runtime of its own on this side, which the
+    // device link asks for by the same lookup the host one uses.
+    if (requiresUBSanRT(ID) && TC.getSanitizerArgs(Args).needsDasanRt() &&
----------------
yxsamliu wrote:

This drops `-fsanitize=daddress` when DASan is installed but UBSan is missing. The missing-DASan check also skips `-Xarch_device -fsanitize=daddress`. Could the runtime check use DASan and the device arguments?

https://github.com/llvm/llvm-project/pull/242444


More information about the llvm-branch-commits mailing list