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

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 23:15:06 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;
----------------
dvyukov wrote:

If we return false here, __asan_handle_no_return won't unpoison stack.
It looks like it's different from the current behavior.
What's the reason for the change?

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


More information about the llvm-commits mailing list