summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/instantiate-function-params.cpp
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-07-31 20:21:20 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-07-31 20:21:20 +0000
commita012d3a68e86a966abb555ee187641be4ea8d9b4 (patch)
tree11f8499ba26495926a0d8e24f62c5e6741c2759b /clang/test/SemaTemplate/instantiate-function-params.cpp
parent957c8b1c701491f56a6b7cdeec0894530d3aec04 (diff)
downloadbcm5719-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 'clang/test/SemaTemplate/instantiate-function-params.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud