diff options
author | Stella Stamenova <stilis@microsoft.com> | 2018-05-17 21:34:24 +0000 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2018-05-17 21:34:24 +0000 |
commit | 0fd67b537bdf5afe09dff10ff3fe325c1a949efe (patch) | |
tree | a854d755c1428033e8fe0cb13d206247c25c3d17 /lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h | |
parent | 3c4c8a09374d9d8ee0e31301e26daa40ff71a3b4 (diff) | |
download | bcm5719-llvm-0fd67b537bdf5afe09dff10ff3fe325c1a949efe.tar.gz bcm5719-llvm-0fd67b537bdf5afe09dff10ff3fe325c1a949efe.zip |
[Windows, Process] Fix an issue in windows thread handling that was causing LLDB to hang
Summary: The function ResumeThread on Windows returns a DWORD which is an unsigned int. In TargetThreadWindows::DoResume, there's code that determines how many times to call ResumeThread based on whether the return value is greater than 0. Since the function returns -1 (as an unsigned int) on failure, this was getting stuck in an infinite loop if ResumeThread failed for any reason. The correct thing to do is check whether the return value is -1 and then return the appropriate error instead of ignoring the return value.
Reviewers: asmith, zturner, labath
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D47020
llvm-svn: 332670
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h index 8b4e3dfdda4..7b93952c01a 100644 --- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h +++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h @@ -37,7 +37,7 @@ public: bool CalculateStopInfo() override; Unwind *GetUnwinder() override; - bool DoResume(); + Status DoResume(); HostThread GetHostThread() const { return m_host_thread; } |