[Lldb-commits] [PATCH] D18075: Fix deadlock due to thread list locking in 'bt all' with obj-c

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 10 18:27:47 PST 2016


jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

Yeah, I'm beginning to wonder whether we're doing ourselves a favor by putting off computing the ObjC runtime symbols till some time that's bound to be more inconvenient than right when we've stopped, but that's beyond the scope of this patch.

For this patch, there's no guarantee that running the JIT'ed code won't cause a thread to exit, so that by the time you got around calling HandleOneThread in this loop it had no real backing .  The Thread your ThreadSP is keeping alive should have been Clear()ed in that case, so IsValid will return false.  It would be good to put an explicit check for that in this loop, and if the thread is no longer valid, report some useful message ("thread disappeared while computing the backtraces.")  Actually, that check should be done before the HandleOneThread in the the other branch of the if as well.


http://reviews.llvm.org/D18075





More information about the lldb-commits mailing list