mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-06 22:20:47 +00:00
8353365: TOUCH_ASSERT_POISON clears GetLastError()
Reviewed-by: kbarrett, stuefe, jwaters
This commit is contained in:
parent
fd2734e97d
commit
3951a8e019
@ -2600,6 +2600,7 @@ static inline void report_error(Thread* t, DWORD exception_code,
|
||||
//-----------------------------------------------------------------------------
|
||||
JNIEXPORT
|
||||
LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
PreserveLastError ple;
|
||||
if (InterceptOSException) return EXCEPTION_CONTINUE_SEARCH;
|
||||
PEXCEPTION_RECORD exception_record = exceptionInfo->ExceptionRecord;
|
||||
DWORD exception_code = exception_record->ExceptionCode;
|
||||
|
||||
@ -28,6 +28,17 @@
|
||||
|
||||
#ifdef ASSERT
|
||||
|
||||
#ifdef _WINDOWS
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
TEST_VM_ASSERT_MSG(vmErrorTest, fatalWithError,
|
||||
"fatal error: GetLastError should be 6 - actually: 6") {
|
||||
SetLastError(6);
|
||||
fatal("GetLastError should be 6 - actually: %lu", GetLastError());
|
||||
}
|
||||
#endif // WINDOWS
|
||||
|
||||
TEST_VM_ASSERT_MSG(vmErrorTest, resourceMark,
|
||||
"fatal error: memory leak: allocating without ResourceMark") {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user