Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-02-13 18:36:44 +0300
committerGitHub <noreply@github.com>2017-02-13 18:36:44 +0300
commit7c557aeb9e0c21b9ca2ef75936bcdc1151760583 (patch)
treeb63c35c681e0131a066e6f8f1949abf6a09c48d7 /src/Native/Runtime/EHHelpers.cpp
parentda20fe0d9874228020d19e6d3334c2e94df033e1 (diff)
Print message for stack oveflow (#2737)
Diffstat (limited to 'src/Native/Runtime/EHHelpers.cpp')
-rw-r--r--src/Native/Runtime/EHHelpers.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Native/Runtime/EHHelpers.cpp b/src/Native/Runtime/EHHelpers.cpp
index 8c7dfb4d7..3e0887c64 100644
--- a/src/Native/Runtime/EHHelpers.cpp
+++ b/src/Native/Runtime/EHHelpers.cpp
@@ -405,7 +405,9 @@ Int32 __stdcall RhpHardwareExceptionHandler(UIntNative faultCode, UIntNative fau
}
else if (faultCode == STATUS_STACK_OVERFLOW)
{
- ASSERT_UNCONDITIONALLY("managed stack overflow");
+ // Do not use ASSERT_UNCONDITIONALLY here. It will crash because of it consumes too much stack.
+
+ PalPrintFatalError("\nProcess is terminating due to StackOverflowException.\n");
RhFailFast();
}
@@ -447,8 +449,10 @@ Int32 __stdcall RhpVectoredExceptionHandler(PEXCEPTION_POINTERS pExPtrs)
}
else if (faultCode == STATUS_STACK_OVERFLOW)
{
- ASSERT_UNCONDITIONALLY("managed stack overflow");
- RhFailFast2(pExPtrs->ExceptionRecord, pExPtrs->ContextRecord);
+ // Do not use ASSERT_UNCONDITIONALLY here. It will crash because of it consumes too much stack.
+
+ PalPrintFatalError("\nProcess is terminating due to StackOverflowException.\n");
+ PalRaiseFailFastException(pExPtrs->ExceptionRecord, pExPtrs->ContextRecord, 0);
}
pExPtrs->ContextRecord->SetIp((UIntNative)&RhpThrowHwEx);
@@ -484,7 +488,7 @@ Int32 __stdcall RhpVectoredExceptionHandler(PEXCEPTION_POINTERS pExPtrs)
// Generally any form of hardware exception within the runtime itself is considered a fatal error.
// Note this includes the managed code within the runtime.
ASSERT_UNCONDITIONALLY("Hardware exception raised inside the runtime.");
- RhFailFast2(pExPtrs->ExceptionRecord, pExPtrs->ContextRecord);
+ PalRaiseFailFastException(pExPtrs->ExceptionRecord, pExPtrs->ContextRecord, 0);
}
}