[Lldb-commits] [PATCH] D106122: Add a mutex to guard access to the ThreadPlanStack class

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 15 20:47:18 PDT 2021


jingham created this revision.
jingham added reviewers: JDevlieghere, kastiglione.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

     
  We've seen reports of crashes (none we've been able to reproduce
  locally) that look like they are caused by concurrent access to a
  thread plan stack.  It looks like there are error paths when an
  interrupt request to debugserver times out that cause this problem.
  
  The thread plan stack access is never in a hot loop, and there
  aren't enough of them for the extra data member to matter, so
  there's really no good reason not to protect the access.
  
  Adding the mutex revealed a couple of places where we were
  using "auto" in an iteration when we should have been using
  "auto &" - we didn't intend to copy the stack - and I fixed
  those as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106122

Files:
  lldb/include/lldb/Target/ThreadPlanStack.h
  lldb/source/Target/ThreadPlanStack.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106122.359202.patch
Type: text/x-patch
Size: 8349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210716/3f2fae6c/attachment.bin>


More information about the lldb-commits mailing list