Fixed a crasher that has been borking out heap for a long time.
authorGreg Clayton <gclayton@apple.com>
Thu, 8 Dec 2016 20:38:19 +0000 (20:38 +0000)
committerGreg Clayton <gclayton@apple.com>
Thu, 8 Dec 2016 20:38:19 +0000 (20:38 +0000)
commitb5cd6e7b7ec244d8f8f4fdfd1f802e42ff48c34b
tree24f623dd42c3db5f60803bdb05c8209cdb8abfac
parent77a45576efa853c52feb48560ab1c7a6210b5878
Fixed a crasher that has been borking out heap for a long time.

ThreadList had an assignment operator that didn't lock the "rhs" thread list object. This means a thread list can be mutated while it is being copied.

The copy constructor calls the assignment operator as well. So this fixes the unsafe threaded access to ThreadList which we believe is responsible for a lot of crashes.

<rdar://problem/28075793>

llvm-svn: 289100
lldb/include/lldb/Target/ThreadCollection.h
lldb/include/lldb/Target/ThreadList.h
lldb/source/Target/ThreadList.cpp