[compiler-rt] [asan] Switch initialization to "double-checked locking" (PR #74387)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 23:57:39 PST 2023


================
@@ -408,9 +406,8 @@ static void AsanInitInternal() {
   // Stop performing init at this point if we are being loaded via
   // dlopen() and the platform supports it.
   if (SANITIZER_SUPPORTS_INIT_FOR_DLOPEN && UNLIKELY(HandleDlopenInit())) {
-    SetAsanInitIsRunning(0);
     VReport(1, "AddressSanitizer init is being performed for dlopen().\n");
-    return;
+    return false;
----------------
vitalybuka wrote:

We didn't get to InitializeShadowMemory below, seems now it must do nothing or crash anyway.

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


More information about the llvm-commits mailing list