[Lldb-commits] [PATCH] D23802: gdb-remote: Make the sequence mutex non-recursive

Nitesh Jain via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 30 03:10:23 PDT 2016


nitesh.jain added inline comments.

================
Comment at: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp:131
@@ +130,3 @@
+
+    GDBRemoteClientBase::Lock lock(gdb_comm, false);
+    if (!lock)
----------------
Hi labath,

This patch cause deadlock when we try to run "reg read f0".  The GDBRemoteRegisterContext::ReadRegister is call twice which result in deadlock since earlier acquire lock has not been release.

1) To Evaluate Dwarf expression so that floating register size can be determine at run time. It add overhead of reading one more register which cause lock to acquire and forgot to release at the end.

2) To read register f0. This time it try to acquire lock which is not been release resulting in deadlock.

-NJ




Repository:
  rL LLVM

https://reviews.llvm.org/D23802





More information about the lldb-commits mailing list