From f4e93c28eabe5033e16f24ebdff24a99408b21f0 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Fri, 13 Mar 2015 20:29:35 +0100 Subject: [PATCH] Add unhandled exception stack trace print This change adds printing of unhandled managed exception stack trace to console before exiting. --- src/vm/stackwalk.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index 0b8ab95..f49e87b 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -790,7 +790,11 @@ UINT_PTR Thread::VirtualUnwindToFirstManagedCallFrame(T_CONTEXT* pContext) if (uControlPc == 0) { - _ASSERTE(!"Thread::VirtualUnwindToFirstManagedCallFrame: PAL_VirtualUnwind reached end of the stack"); + // This displays the managed stack in case the unwind has walked out of the stack and + // a managed exception was being unwound. + DefaultCatchHandler(NULL /*pExceptionInfo*/, NULL /*Throwable*/, TRUE /*useLastThrownObject*/, + TRUE /*isTerminating*/, FALSE /*isThreadBaseFIlter*/, FALSE /*sendAppDomainEvents*/); + EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE); } -- 2.7.4