Skip to content

Commit 188b412

Browse files
authored
Fix handling exceptions on shutdown (#101915)
A recent partial backport of a change to enable propagating exceptions on shutdown was missing two places in the code that were under a different condition than the global exception handling disabling that was removed. I must have made a mistake when testing that change (not setting watson registry settings properly or using a stale build). This change makes it work correctly.
1 parent b040b7a commit 188b412

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/coreclr/vm/excep.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6696,14 +6696,6 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandlerPhase3(PEXCEPTION_POINTERS pExcepti
66966696

66976697
VEH_ACTION WINAPI CLRVectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
66986698
{
6699-
// It is not safe to execute code inside VM after we shutdown EE. One example is DisablePreemptiveGC
6700-
// will block forever.
6701-
if (g_fForbidEnterEE)
6702-
{
6703-
return VEH_CONTINUE_SEARCH;
6704-
}
6705-
6706-
67076699
//
67086700
// DO NOT USE CONTRACTS HERE AS THIS ROUTINE MAY NEVER RETURN. You can use
67096701
// static contracts, but currently this is all WRAPPER_NO_CONTRACT.
@@ -7385,12 +7377,6 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
73857377
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING
73867378
//
73877379

7388-
// If runtime have been disabled, then simply return.
7389-
if (g_fForbidEnterEE)
7390-
{
7391-
return EXCEPTION_CONTINUE_SEARCH;
7392-
}
7393-
73947380
// WARNING
73957381
//
73967382
// We must preserve this so that GCStress=4 eh processing doesnt kill last error.

0 commit comments

Comments
 (0)