[Lldb-commits] [lldb] caa5167 - Revert "[lldb] Fix data race in ConnectionFileDescriptor"

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 7 19:11:16 PDT 2023


Author: Jonas Devlieghere
Date: 2023-08-07T19:11:11-07:00
New Revision: caa5167769b5d8a0165e6c1cb7c919e864346db2

URL: https://github.com/llvm/llvm-project/commit/caa5167769b5d8a0165e6c1cb7c919e864346db2
DIFF: https://github.com/llvm/llvm-project/commit/caa5167769b5d8a0165e6c1cb7c919e864346db2.diff

LOG: Revert "[lldb] Fix data race in ConnectionFileDescriptor"

This reverts commit 0bdbe7bd7f1589817495a60cc8422df49575b17b because it
broke the bots.

Added: 
    

Modified: 
    lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
    lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h b/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
index 8c8424ed48154b..35773d5907e913 100644
--- a/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
+++ b/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
@@ -131,7 +131,7 @@ class ConnectionFileDescriptor : public Connection {
   lldb::IOObjectSP m_io_sp;
 
   Pipe m_pipe;
-  mutable std::recursive_mutex m_mutex;
+  std::recursive_mutex m_mutex;
   std::atomic<bool> m_shutting_down; // This marks that we are shutting down so
                                      // if we get woken up from
   // BytesAvailable to disconnect, we won't try to read again.

diff  --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
index 9bb0268b2a704c..6a367a3307e543 100644
--- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
+++ b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
@@ -118,7 +118,6 @@ void ConnectionFileDescriptor::CloseCommandPipe() {
 }
 
 bool ConnectionFileDescriptor::IsConnected() const {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
   return m_io_sp && m_io_sp->IsValid();
 }
 


        


More information about the lldb-commits mailing list