[llvm-branch-commits] [clang] [Clang] Enable UBSan for AMDGPU device offload (PR #219973)
Yaxun Liu via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 31 14:51:34 PDT 2026
================
@@ -1816,17 +1841,21 @@ collectSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
}
if (SanArgs.needsUbsanLoopDetectRt())
NonWholeStaticRuntimes.push_back("ubsan_loop_detect");
+ if (hostNeedsUbsanDeviceRt(C, TC)) {
----------------
yxsamliu wrote:
`collectSanitizerRuntimes()` returns early for `-shared`, before adding `ubsan_device`. A shared library can contain UBSan-instrumented GPU code, and the final executable link may not know that this runtime is needed. How is device UBSan intended to work for shared libraries?
https://github.com/llvm/llvm-project/pull/219973
More information about the llvm-branch-commits
mailing list