Author: zturner Date: Thu Aug 20 17:08:38 2015 New Revision: 245626 URL: http://llvm.org/viewvc/llvm-project?rev=245626&view=rev Log: [ProcessWindows] Fix rare crash on shutdown.
There might be an underlying race condition here that should be figured out, but this at least prevents the crash for the time being and doesn't appear to have any adverse effects. Modified: lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp Modified: lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp?rev=245626&r1=245625&r2=245626&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp (original) +++ lldb/trunk/source/Plugins/Process/Windows/ProcessWindows.cpp Thu Aug 20 17:08:38 2015 @@ -568,6 +568,9 @@ ProcessWindows::RefreshStateAfterStop() StopInfoSP stop_info; m_thread_list.SetSelectedThreadByID(active_exception->GetThreadID()); ThreadSP stop_thread = m_thread_list.GetSelectedThread(); + if (!stop_thread) + return; + RegisterContextSP register_context = stop_thread->GetRegisterContext(); // The current EIP is AFTER the BP opcode, which is one byte. _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits