diff options
author | Mike McLaughlin <mikem@microsoft.com> | 2016-09-20 15:22:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-20 15:22:33 -0700 |
commit | f29eee4896d490f88e06865916d5821d0fad935a (patch) | |
tree | 262342312fc717b24dc691cecdf0773df5f001bb | |
parent | 610c0b1cd28b5624f718b739d2eea4c0a44f5adb (diff) | |
download | coreclr-f29eee4896d490f88e06865916d5821d0fad935a.tar.gz coreclr-f29eee4896d490f88e06865916d5821d0fad935a.tar.bz2 coreclr-f29eee4896d490f88e06865916d5821d0fad935a.zip |
Fix launch timing issue in dbgshim found in VS. (#7279)
Issue #7274.
-rw-r--r-- | src/dlls/dbgshim/dbgshim.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dlls/dbgshim/dbgshim.cpp b/src/dlls/dbgshim/dbgshim.cpp index 3c4e951934..4d6dc5a6e3 100644 --- a/src/dlls/dbgshim/dbgshim.cpp +++ b/src/dlls/dbgshim/dbgshim.cpp @@ -392,7 +392,7 @@ public: int numTries = 0; HRESULT hr; - while (numTries < 10) + while (numTries < 25) { // EnumerateCLRs uses the OS API CreateToolhelp32Snapshot which can return ERROR_BAD_LENGTH or // ERROR_PARTIAL_COPY. If we get either of those, we try wait 1/10th of a second try again (that @@ -517,7 +517,9 @@ public: bool coreclrExists = false; HRESULT hr = InvokeStartupCallback(&coreclrExists); - if (SUCCEEDED(hr)) + // Because the target process is suspended on create, the toolhelp apis fail with the below errors even + // with the retry logic in InternalEnumerateCLRs. + if (SUCCEEDED(hr) || (hr == HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) || (hr == HRESULT_FROM_WIN32(ERROR_BAD_LENGTH))) { if (!coreclrExists && !m_canceled) { |