diff options
| author | Daniel Malea <daniel.malea@intel.com> | 2013-07-31 20:21:20 +0000 |
|---|---|---|
| committer | Daniel Malea <daniel.malea@intel.com> | 2013-07-31 20:21:20 +0000 |
| commit | a012d3a68e86a966abb555ee187641be4ea8d9b4 (patch) | |
| tree | 11f8499ba26495926a0d8e24f62c5e6741c2759b /lldb/test/lang/cpp/class_static/TestStaticVariables.py | |
| parent | 957c8b1c701491f56a6b7cdeec0894530d3aec04 (diff) | |
| download | bcm5719-llvm-a012d3a68e86a966abb555ee187641be4ea8d9b4.tar.gz bcm5719-llvm-a012d3a68e86a966abb555ee187641be4ea8d9b4.zip | |
Fix lock hierarchy violation in Process (lock ordering of ThreadList mutex and StackFrameList mutex)
- this fix ensures the ThreadList mutex is always locked before the StackFrameList mutex
Situation where deadlock could occur (without this fix):
Thread 1 is in Process::WillResume and locks the ThreadList mutex (on entry), and subsequently calls StackFrameList::Clear() which locks the StackFrameList mutex.
Meanwhile, thread 2 is in Process::RunThreadPlan and calls Thread::SetSelectedFrame() (which locks the StackFrameList mutex) before calling GetSelectedThread (which attempts to lock the ThreadList mutex)
In my testing on both Linux and Mac OS X, I was unable to reproduce any hangs with this patch applied.
llvm-svn: 187522
Diffstat (limited to 'lldb/test/lang/cpp/class_static/TestStaticVariables.py')
0 files changed, 0 insertions, 0 deletions

