Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3567,8 +3567,14 @@ LONG WatsonLastChance( // EXCEPTION_CONTINUE_SEARCH, _CONTINUE_
#ifdef HOST_WINDOWS
CreateCrashDumpIfEnabled(fSOException);
#endif
RaiseFailFastException(pExceptionInfo == NULL ? NULL : pExceptionInfo->ExceptionRecord,
pExceptionInfo == NULL ? NULL : pExceptionInfo->ContextRecord,
// RaiseFailFastException validates that the context matches a valid return address on the stack as part of CET.
// If the return address is not valid, it rejects the context, flags it as a potential attack and asserts in
// checked builds of Windows OS.
// Avoid reporting thread context captured by EEPolicy::HandleFatalError since it has IP that does not
// match a valid return address on the stack.
bool fAvoidReportContextToRaiseFailFast = tore.IsFatalError();
RaiseFailFastException(pExceptionInfo == NULL ? NULL : pExceptionInfo->ExceptionRecord,
pExceptionInfo == NULL || fAvoidReportContextToRaiseFailFast ? NULL : pExceptionInfo->ContextRecord,
0);
STRESS_LOG0(LF_CORDB, LL_INFO10, "D::RFFE: Return from RaiseFailFastException\n");
}
Expand Down