llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: None (nd) <details> <summary>Changes</summary> Lock ensures modules don't change during iteration. --- Full diff: https://github.com/llvm/llvm-project/pull/139862.diff 1 Files Affected: - (modified) lldb/source/Target/Target.cpp (+1) ``````````diff diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 7f61f8689fb95..485b49aeb64b4 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1510,6 +1510,7 @@ bool Target::IgnoreWatchpointByID(lldb::watch_id_t watch_id, } ModuleSP Target::GetExecutableModule() { + std::lock_guard<std::recursive_mutex> guard(m_images.GetMutex()); // search for the first executable in the module list for (size_t i = 0; i < m_images.GetSize(); ++i) { ModuleSP module_sp = m_images.GetModuleAtIndex(i); `````````` </details> https://github.com/llvm/llvm-project/pull/139862 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits