diff options
Diffstat (limited to 'src/vm/excep.cpp')
-rw-r--r-- | src/vm/excep.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index d4f0bf78bf..e8a17d4262 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -4978,8 +4978,9 @@ BOOL InstallUnhandledExceptionFilter() { // We will be here only for CoreCLR on WLC since we dont // register UEF for SL. if (g_pOriginalUnhandledExceptionFilter == FILTER_NOT_INSTALLED) { - g_pOriginalUnhandledExceptionFilter = - SetUnhandledExceptionFilter(COMUnhandledExceptionFilter); + +#pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.") + g_pOriginalUnhandledExceptionFilter = SetUnhandledExceptionFilter(COMUnhandledExceptionFilter); // make sure is set (ie. is not our special value to indicate unset) LOG((LF_EH, LL_INFO10, "InstallUnhandledExceptionFilter registered UEF with OS for CoreCLR!\n")); } @@ -5013,7 +5014,10 @@ void UninstallUnhandledExceptionFilter() { #else // !FEATURE_UEF_CHAINMANAGER // We will be here only for CoreCLR on WLC or on Mac SL. if (g_pOriginalUnhandledExceptionFilter != FILTER_NOT_INSTALLED) { + +#pragma prefast(suppress:28725, "Calling to SetUnhandledExceptionFilter is intentional in this case.") SetUnhandledExceptionFilter(g_pOriginalUnhandledExceptionFilter); + g_pOriginalUnhandledExceptionFilter = FILTER_NOT_INSTALLED; LOG((LF_EH, LL_INFO10, "UninstallUnhandledExceptionFilter unregistered UEF from OS for CoreCLR!\n")); } |