[clang] [compiler-rt] [compiler-rt] Support `-shared-libsan` for Offload UBSan (PR #226551)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 16:08:59 PDT 2026
================
@@ -67,8 +67,15 @@ void Initialize() {
if (UNLIKELY(!Offload::Get().Ready())) \
return REAL(name)(__VA_ARGS__);
-// PPC cannot transparently tail-call an indirect dlsym target for RTLD_NEXT.
-#if !SANITIZER_PPC
+// The dlsym interceptor is only transparent if it can tail-call, which PPC and
+// compilers without musttail cannot guarantee.
+#if defined(__has_cpp_attribute)
+#if __has_cpp_attribute(clang::musttail) && !SANITIZER_PPC
----------------
jhuber6 wrote:
Yeah, the `dlsym` interception is the scummiest part of this, but it's necessary since there are users of HSA through this method. I'll see what I can do.
https://github.com/llvm/llvm-project/pull/226551
More information about the llvm-commits
mailing list