[Lldb-commits] [lldb] r147883 - /lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
Jim Ingham
jingham at apple.com
Tue Jan 10 14:21:42 PST 2012
Author: jingham
Date: Tue Jan 10 16:21:42 2012
New Revision: 147883
URL: http://llvm.org/viewvc/llvm-project?rev=147883&view=rev
Log:
Check the return value of GetBasicInfo before dereferencing it. <rdar://problem/10568492>
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp?rev=147883&r1=147882&r2=147883&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp Tue Jan 10 16:21:42 2012
@@ -95,8 +95,13 @@
if (others_stopped)
{
- times_to_resume = GetBasicInfo()->suspend_count;
- m_suspend_count = - (times_to_resume - m_suspend_count);
+ if (GetBasicInfo())
+ {
+ times_to_resume = m_basic_info.suspend_count;
+ m_suspend_count = - (times_to_resume - m_suspend_count);
+ }
+ else
+ times_to_resume = 0;
}
else
{
More information about the lldb-commits
mailing list