Skip to content

Commit b35b67d

Browse files
authored
Move first chance exception notification so the !pe works (#101190)
The recent addition of first chance exception notification for the new EH was comming too early, so when the notification occurred, the !pe SOS command was not able to get the actual exception yet - it was not accessible via the Thread::ExceptionState This change moves the notification to the first spot where the exception state points to the exception, so the !pe works.
1 parent 989f62c commit b35b67d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coreclr/vm/exceptionhandling.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5655,8 +5655,6 @@ VOID DECLSPEC_NORETURN DispatchManagedException(OBJECTREF throwable, CONTEXT* pE
56555655
args[ARGNUM_0] = OBJECTREF_TO_ARGHOLDER(throwable);
56565656
args[ARGNUM_1] = PTR_TO_ARGHOLDER(&exInfo);
56575657

5658-
FirstChanceExceptionNotification();
5659-
56605658
pThread->IncPreventAbort();
56615659

56625660
//Ex.RhThrowEx(throwable, &exInfo)
@@ -8127,6 +8125,7 @@ static void NotifyExceptionPassStarted(StackFrameIterator *pThis, Thread *pThrea
81278125
{
81288126
GCX_COOP();
81298127
pThread->SafeSetThrowables(pExInfo->m_exception);
8128+
FirstChanceExceptionNotification();
81308129
EEToProfilerExceptionInterfaceWrapper::ExceptionThrown(pThread);
81318130
}
81328131
else // pExInfo->m_passNumber == 2

0 commit comments

Comments
 (0)