[Lldb-commits] [lldb] [lldb] Improve locking in PathMappingLists (NFC) (PR #114576)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 11 12:01:47 PST 2024
================
@@ -264,34 +288,35 @@ PathMappingList::FindFile(const FileSpec &orig_spec) const {
bool PathMappingList::Replace(llvm::StringRef path, llvm::StringRef new_path,
bool notify) {
- std::lock_guard<std::recursive_mutex> lock(m_mutex);
- uint32_t idx = FindIndexForPath(path);
- if (idx < m_pairs.size()) {
+ {
+ std::lock_guard<std::mutex> lock(m_pairs_mutex);
+ uint32_t idx = FindIndexForPath(path);
----------------
JDevlieghere wrote:
Yup, I fixed the issue in the re-land. @kastiglione confirmed offline that that fixed the deadlock he observed.
https://github.com/llvm/llvm-project/pull/114576
More information about the lldb-commits
mailing list