8185734: [Windows] Structured Exception Catcher missing around gtest execution

Reviewed-by: dholmes, ihse
This commit is contained in:
Thomas Stuefe 2020-12-15 09:02:46 +00:00
parent 3ab1dfeb8f
commit 568dc29b9a
5 changed files with 17 additions and 0 deletions

View file

@ -512,6 +512,7 @@ struct tm* os::gmtime_pd(const time_t* clock, struct tm* res) {
return NULL;
}
JNIEXPORT
LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo);
// Thread start routine for all newly created threads
@ -2441,6 +2442,7 @@ static inline void report_error(Thread* t, DWORD exception_code,
}
//-----------------------------------------------------------------------------
JNIEXPORT
LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH;
PEXCEPTION_RECORD exception_record = exceptionInfo->ExceptionRecord;