This is an archive of the discontinued LLVM Phabricator instance.

[Windows] Fix a bug that causes lldb to freeze
ClosedPublic

Authored by asmith on Oct 10 2018, 10:13 AM.

Details

Summary

If the process exits before any initial stop then notify the debugger
of the error otherwise WaitForDebuggerConnection() will be blocked.
An example of this issue is when a process fails to load a dependent DLL.

In addition to the fix, remove a duplicate call to FreeProcessHandles() in
DebuggerThread::HandleExitProcessEvent() and use decimal format
for all thread IDs.

Diff Detail

Event Timeline

asmith created this revision.Oct 10 2018, 10:13 AM
asmith edited the summary of this revision. (Show Details)Oct 10 2018, 10:26 AM
zturner accepted this revision.Oct 10 2018, 11:20 AM

Nice find, thanks

This revision is now accepted and ready to land.Oct 10 2018, 11:20 AM
asmith retitled this revision from [ProcessWindows] Fix a bug that causes lldb to freeze to [Windows] Fix a bug that causes lldb to freeze.Oct 10 2018, 11:30 AM
asmith edited the summary of this revision. (Show Details)
asmith closed this revision.Oct 10 2018, 11:32 AM
labath added a subscriber: labath.Oct 15 2018, 11:39 AM

Do we have a test for this? It sounds like it shouldn't be hard to replicate the dependent library load failure in a test...