[Lldb-commits] [lldb] r245626 - [ProcessWindows] Fix rare crash on shutdown.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 20 15:08:38 PDT 2015


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.




More information about the lldb-commits mailing list