[Lldb-commits] [PATCH] D148380: [lldb] Lock accesses to PathMappingLists's internals

Nick Desaulniers via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 21 15:25:27 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: lldb/source/Target/PathMappingList.cpp:51
   if (this != &rhs) {
+    std::scoped_lock locks(m_mutex, rhs.m_mutex);
     m_pairs = rhs.m_pairs;
----------------
```
[412/1011] Building CXX object tools/lldb/sourc...CMakeFiles/lldbTarget.dir/PathMappingList.cpp.o
/android0/llvm-project/lldb/source/Target/PathMappingList.cpp:51:5: warning: 'scoped_lock' may not intend to support class template argument deduction [-Wctad-maybe-unsupported]
    std::scoped_lock locks(m_mutex, rhs.m_mutex);
    ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
```


================
Comment at: lldb/source/Target/PathMappingList.cpp:72
 void PathMappingList::Append(const PathMappingList &rhs, bool notify) {
+  std::scoped_lock locks(m_mutex, rhs.m_mutex);
   ++m_mod_id;
----------------
```
/android0/llvm-project/lldb/source/Target/PathMappingList.cpp:72:3: warning: 'scoped_lock' may not intend to support class template argument deduction [-Wctad-maybe-unsupported]
  std::scoped_lock locks(m_mutex, rhs.m_mutex);
  ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/mutex:692:11: note: add a deduction guide to suppress this warning
    class scoped_lock
          ^
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148380/new/

https://reviews.llvm.org/D148380



More information about the lldb-commits mailing list