[PATCH] D33581: Fix the ManagedStatic list ordering when using DynamicLibrary::addPermanentLibrary.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 11:47:59 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Support/DynamicLibrary.cpp:136
+  if (Handle != &Invalid) {
+    SmartScopedLock<true> Lock(*SymbolsMutex);
+    HS.AddLibrary(Handle, /*IsProcess*/ FileName == nullptr);
----------------
Why are you changing the scope of this lock?  (What happens if a static constructor in a library calls getPermanentLibrary?)


https://reviews.llvm.org/D33581





More information about the llvm-commits mailing list