Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Do not honor attribute HandleProcessCorruptedStateExceptions #10957

Merged
merged 1 commit into from
Apr 18, 2017
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/vm/exceptionhandling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ ProcessCLRException(IN PEXCEPTION_RECORD pExceptionRecord
CEHelper::SetupCorruptionSeverityForActiveException((STState == ExceptionTracker::STS_FirstRethrowFrame), (pTracker->GetPreviousExceptionTracker() != NULL),
CEHelper::ShouldTreatActiveExceptionAsNonCorrupting());
}

// Failfast if exception indicates corrupted process state
if (pTracker->GetCorruptionSeverity() == ProcessCorrupting)
EEPOLICY_HANDLE_FATAL_ERROR(pExceptionRecord->ExceptionCode);
}
#endif // FEATURE_CORRUPTING_EXCEPTIONS

Expand Down
5 changes: 5 additions & 0 deletions src/vm/i386/excepx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,11 @@ CPFH_RealFirstPassHandler( // ExceptionContinueSearch, etc.
// of the active exception.
CEHelper::SetupCorruptionSeverityForActiveException(bRethrownException, bNestedException,
CEHelper::ShouldTreatActiveExceptionAsNonCorrupting());

// Failfast if exception indicates corrupted process state
if (pExInfo->GetCorruptionSeverity() == ProcessCorrupting)
EEPOLICY_HANDLE_FATAL_ERROR(exceptionCode);

END_SO_INTOLERANT_CODE;
}
#endif // FEATURE_CORRUPTING_EXCEPTIONS
Expand Down
4 changes: 2 additions & 2 deletions tests/src/JIT/Directed/pinvoke/calli_excep.il
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
int32 V_1)
.try
{
ldc.i4 0xc0000005
ldc.i4 0xC0000017
ldc.i4.0
dup
dup
Expand All @@ -44,7 +44,7 @@
calli void (unsigned int32, unsigned int32, unsigned int32, native uint)
leave.s IL_001d
} // end .try
catch [mscorlib]System.AccessViolationException
catch [mscorlib]System.OutOfMemoryException
{
IL_000f: stloc.0
IL_0010: ldloc.0
Expand Down