[Lldb-commits] [PATCH] D46733: Add a lock to PlatformPOSIX::DoLoadImage

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 10 17:05:50 PDT 2018


clayborg added inline comments.


================
Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:1047
+    static std::mutex do_dlopen_mutex;
+    std::lock_guard<std::mutex> lock(do_dlopen_mutex);
+
----------------
Accessor would be fine. The other reason for putting this in the process is multi-threaded code that attempts to use this after the main thread has exited will crash as the static mutex might destruct itself. 


https://reviews.llvm.org/D46733





More information about the lldb-commits mailing list