[llvm-branch-commits] [clang] [Clang] Add -fsanitize=daddress for Device AddressSanitizer (PR #242444)
Joseph Huber via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Nov 14 11:33:52 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() &&
----------------
jhuber6 wrote:
I realized that this can be simplified, because the UBSan guarding was just to let legacy host-only UBSan work w/o the sanitizer runtime. I think going forward it might make sense to just make this the *canonical* HIP sanitizer and remove this hedging entirely.
https://github.com/llvm/llvm-project/pull/242444
More information about the llvm-branch-commits
mailing list