[all-commits] [llvm/llvm-project] 6eb576: Add a mutex to guard access to the ThreadPlanStack...
jimingham via All-commits
all-commits at lists.llvm.org
Fri Jul 16 15:41:34 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6eb576dcff45fa53e8ceb30c7648b903c1413e05
https://github.com/llvm/llvm-project/commit/6eb576dcff45fa53e8ceb30c7648b903c1413e05
Author: Jim Ingham <jingham at apple.com>
Date: 2021-07-16 (Fri, 16 Jul 2021)
Changed paths:
M lldb/include/lldb/Target/ThreadPlanStack.h
M lldb/source/Target/ThreadPlanStack.cpp
Log Message:
-----------
Add a mutex to guard access to the ThreadPlanStack class
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.
Except for preventing crashes this should be NFC.
Differential Revision: https\://reviews.llvm.org/D106122
More information about the All-commits
mailing list