summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorStephane Sezer <sas@cd80.net>2016-03-17 18:52:41 +0000
committerStephane Sezer <sas@cd80.net>2016-03-17 18:52:41 +0000
commitf81049184a7d05b63f62d4ccd01ad411d9f4fa03 (patch)
treecf16da93a19bed422cb5649dfab8093c1d2cb2a0 /clang/lib/CodeGen/ModuleBuilder.cpp
parent7b390ec4cde7b4d1dc05a55412f53010ef16dfff (diff)
downloadbcm5719-llvm-f81049184a7d05b63f62d4ccd01ad411d9f4fa03.tar.gz
bcm5719-llvm-f81049184a7d05b63f62d4ccd01ad411d9f4fa03.zip
Fix deadlock due to thread list locking in 'bt all' with obj-c
Summary: The gdb-remote async thread cannot modify thread state while the main thread holds a lock on the state. Don't use locking thread iteration for bt all. Specifically, the deadlock manifests when lldb attempts to JIT code to symbolicate objective c while backtracing. As part of this code path, SetPrivateState() is called on an async thread. This async thread will block waiting for the thread_list lock held by the main thread in CommandObjectIterateOverThreads. The main thread will also block on the async thread during DoResume (although with a timeout), leading to a deadlock. Due to the timeout, the deadlock is not immediately apparent, but the inferior will be left in an invalid state after the bt all completes, and objective-c symbols will not be successfully resolved in the backtrace. Reviewers: andrew.w.kaylor, jingham, clayborg Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D18075 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 263735
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud