[Lldb-commits] [lldb] r253086 - Add a null check against the ThreadPlan
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 13 13:28:54 PST 2015
Author: zturner
Date: Fri Nov 13 15:28:53 2015
New Revision: 253086
URL: http://llvm.org/viewvc/llvm-project?rev=253086&view=rev
Log:
Add a null check against the ThreadPlan
I'm seeing some cases where the ThreadPlan is null. It could
be a sign of a valid race condition, but at least we shouldn't
crash.
Modified:
lldb/trunk/source/Target/ThreadList.cpp
Modified: lldb/trunk/source/Target/ThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadList.cpp?rev=253086&r1=253085&r2=253086&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadList.cpp (original)
+++ lldb/trunk/source/Target/ThreadList.cpp Fri Nov 13 15:28:53 2015
@@ -538,7 +538,7 @@ ThreadList::WillResume ()
for (pos = m_threads.begin(); pos != end; ++pos)
{
- if ((*pos)->GetResumeState() != eStateSuspended &&
+ if ((*pos)->GetResumeState() != eStateSuspended && (*pos)->GetCurrentPlan() &&
(*pos)->GetCurrentPlan()->StopOthers())
{
if ((*pos)->IsOperatingSystemPluginThread() && !(*pos)->GetBackingThread())
More information about the lldb-commits
mailing list