summaryrefslogtreecommitdiff
path: root/build.proj
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2017-01-20 17:46:06 -0800
committerGitHub <noreply@github.com>2017-01-20 17:46:06 -0800
commit3d768880d8034fe285849684abc044553e5d77f8 (patch)
tree71450a8aedbc83a539eb7d0b6894c904f43762d1 /build.proj
parentbb4fd8fcf84d2e777d7b8bee4e5fc475ab2397d7 (diff)
downloadcoreclr-3d768880d8034fe285849684abc044553e5d77f8.tar.gz
coreclr-3d768880d8034fe285849684abc044553e5d77f8.tar.bz2
coreclr-3d768880d8034fe285849684abc044553e5d77f8.zip
Fix debugger launch race hitting breakpoints in startup code. (#8951)
The attached flag was been set asynchronously relative to the DebugActiveProcess returning. This could cause a race where the initial module load notification being missed/not sent to the debugger. This fix sets the attached flag before any notifications sent during launch if the runtime was launched/attached using the startup handshake after dbgshim tells the runtime to "continue" when the runtime startup API callback returns. Also fixes another race condition in dbgshim where EnumerateCLRs returns a NULL continue event handle because the coreclr module was loaded but the g_hContinueStartupEvent wasn't initialized on the runtime side yet. Changed the static initialization of g_hContinueStartupEvent to INVALID_HANDLE_VALUE and the InternalEnumerateCLRs sleep/retry loop to retry when any of the handles are INVALID_HANDLE_VALUE. This fixes the race only when you have the latest dbgshim and coreclr binaries and the old/new mixes still function but don't fix the race.
Diffstat (limited to 'build.proj')
0 files changed, 0 insertions, 0 deletions