From e7118086e2d02fb1f95891f7baadcc3557e6e589 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Wed, 30 Nov 2016 13:06:11 +0900 Subject: [PATCH 1/3] Disable LeaveCatch for non-Windows platforms --- src/vm/excep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index 68eafba65093..eee2b6b30fff 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -1675,7 +1675,7 @@ bool FinallyIsUnwinding(EHRangeTreeNode *pNode, return false; } -#ifndef WIN64EXCEPTIONS +#if !defined(WIN64EXCEPTIONS) && !defined(FEATURE_PAL) BOOL LeaveCatch(ICodeManager* pEECM, Thread *pThread, CONTEXT *pCtx, @@ -1865,7 +1865,7 @@ HRESULT IsLegalTransition(Thread *pThread, case TCF_NONE: case TCF_TRY: { -#if !defined(WIN64EXCEPTIONS) +#if !defined(WIN64EXCEPTIONS) && !defined(FEATURE_PAL) CONTEXT *pFilterCtx = pThread->GetFilterContext(); if (pFilterCtx == NULL) return CORDBG_E_SET_IP_IMPOSSIBLE; From e393e0de9e32e55acaf2db18796ca49c25d325e7 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Fri, 2 Dec 2016 10:05:22 +0900 Subject: [PATCH 2/3] Mark LeaveCatch as NYI --- src/vm/excep.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index eee2b6b30fff..647508ef3038 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -1675,7 +1675,7 @@ bool FinallyIsUnwinding(EHRangeTreeNode *pNode, return false; } -#if !defined(WIN64EXCEPTIONS) && !defined(FEATURE_PAL) +#if !defined(WIN64EXCEPTIONS) BOOL LeaveCatch(ICodeManager* pEECM, Thread *pThread, CONTEXT *pCtx, @@ -1690,6 +1690,7 @@ BOOL LeaveCatch(ICodeManager* pEECM, } CONTRACTL_END; +#ifndef FEATURE_PAL // We can assert these things here, and skip a call // to COMPlusCheckForAbort later. @@ -1707,6 +1708,10 @@ BOOL LeaveCatch(ICodeManager* pEECM, SetSP(pCtx, (UINT_PTR)esp); return TRUE; +#else // FEATURE_PAL + PORTABILITY_ASSERT("LeaveCatch"); + return FALSE; +#endif } #endif // WIN64EXCEPTIONS @@ -1865,7 +1870,7 @@ HRESULT IsLegalTransition(Thread *pThread, case TCF_NONE: case TCF_TRY: { -#if !defined(WIN64EXCEPTIONS) && !defined(FEATURE_PAL) +#if !defined(WIN64EXCEPTIONS) CONTEXT *pFilterCtx = pThread->GetFilterContext(); if (pFilterCtx == NULL) return CORDBG_E_SET_IP_IMPOSSIBLE; From bd01f2b31d4baeeee7ce4d75f1ecba8fa96ffe0d Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Fri, 2 Dec 2016 17:48:30 +0900 Subject: [PATCH 3/3] Use #ifndef as before --- src/vm/excep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index 647508ef3038..e6d062e8e481 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -1675,7 +1675,7 @@ bool FinallyIsUnwinding(EHRangeTreeNode *pNode, return false; } -#if !defined(WIN64EXCEPTIONS) +#ifndef WIN64EXCEPTIONS BOOL LeaveCatch(ICodeManager* pEECM, Thread *pThread, CONTEXT *pCtx,