[llvm-branch-commits] [compiler-rt] [CopyProf] Add libc interceptors. (PR #232851)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 1 11:17:27 PST 2026


================
@@ -38,14 +39,18 @@ static void CheckUnwind() {
 static void Initialize() {
   if (LIKELY(copyprof_is_initialized))
     return;
+  SanitizerToolName = "CopyProf";
   CHECK(!copyprof_init_is_running &&
         "BUG: CopyProf Initialize() must not call itself.");
   copyprof_init_is_running = true;
   CacheBinaryName();
+  // CopyProf uses interception so ensure we're not statically linked.
+  __interception::DoesNotSupportStaticLinking();
   SetCheckUnwindCallback(&CheckUnwind);
   InitializePlatformEarly();
   SetCommonFlagsDefaults();
   InitializeCommonFlags();
+  InitializeInterceptors();
----------------
newgre wrote:

memprof, asan, tsan, msan all use that same ordering it seems: interceptors first, then shadow memory.

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


More information about the llvm-branch-commits mailing list