From: Jan Vorlicek Date: Wed, 13 Jul 2016 22:54:42 +0000 (+0200) Subject: Make StubHelpers::ProcessByrefValidationList NOTHROW (#6258) X-Git-Tag: accepted/tizen/base/20180629.140029~4051 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a8cae775a27861a37f89b2c042faea90e25cdaa;p=platform%2Fupstream%2Fcoreclr.git Make StubHelpers::ProcessByrefValidationList NOTHROW (#6258) This change fixes StubHelpers::ProcessByrefValidationList so that it doesn't throw. While there was a EX_TRY / EX_CATCH, the catch handler calls FormatValidationMessage to format the message before aborting the process and that function can throw. The fix is to wrap the inside of the EX_CATCH in one more EX_TRY / EX_CATCH and abort the process without message if there is an exception in the FormatValidationMessage. --- diff --git a/src/vm/stubhelpers.cpp b/src/vm/stubhelpers.cpp index 6e8ac76..5996f5d 100644 --- a/src/vm/stubhelpers.cpp +++ b/src/vm/stubhelpers.cpp @@ -168,8 +168,16 @@ void StubHelpers::ProcessByrefValidationList() } EX_CATCH { - FormatValidationMessage(entry.pMD, errorString); - EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, errorString.GetUnicode()); + EX_TRY + { + FormatValidationMessage(entry.pMD, errorString); + EEPOLICY_HANDLE_FATAL_ERROR_WITH_MESSAGE(COR_E_EXECUTIONENGINE, errorString.GetUnicode()); + } + EX_CATCH + { + EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE); + } + EX_END_CATCH_UNREACHABLE; } EX_END_CATCH_UNREACHABLE;