[clang] [compiler-rt] [XRay][Darwin] Enable XRay runtime on macOS (arm64/x86_64) (PR #196848)

Dan Blackwell via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 02:40:35 PDT 2026


================
@@ -135,26 +142,46 @@ void __xray_init() XRAY_NEVER_INSTRUMENT {
     atomic_store(&XRayFlagsInitialized, true, memory_order_release);
   }
 
+#if SANITIZER_APPLE
+  // Use the dyld image callback to discover XRay sections in all loaded
+  // images. This handles both the normal case (runtime linked into the
+  // binary) and the DYLD_INSERT_LIBRARIES injection case (runtime in a
+  // separate dylib, sleds in the host binary).
----------------
DanBlackwell wrote:

Do you have to consider `dlopen` too?

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


More information about the llvm-commits mailing list