diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index 9b022792e15..7cad3701987 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -625,7 +625,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER], TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced -fno-exceptions \ -qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect" elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then - TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP" + TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -permissive- -MP" TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-" fi diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp index 7c3cf9be093..2107b8365d0 100644 --- a/src/hotspot/os/windows/os_windows.cpp +++ b/src/hotspot/os/windows/os_windows.cpp @@ -2284,7 +2284,7 @@ void* os::win32::install_signal_handler(int sig, signal_handler_t handler) { sigbreakHandler = handler; return oldHandler; } else { - return ::signal(sig, handler); + return CAST_FROM_FN_PTR(void*, ::signal(sig, handler)); } } @@ -2935,22 +2935,23 @@ LONG WINAPI topLevelVectoredExceptionFilter(struct _EXCEPTION_POINTERS* exceptio #if defined(USE_VECTORED_EXCEPTION_HANDLING) LONG WINAPI topLevelUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) { - if (InterceptOSException) goto exit; - DWORD exception_code = exceptionInfo->ExceptionRecord->ExceptionCode; + if (!InterceptOSException) { + DWORD exceptionCode = exceptionInfo->ExceptionRecord->ExceptionCode; #if defined(_M_ARM64) - address pc = (address)exceptionInfo->ContextRecord->Pc; + address pc = (address) exceptionInfo->ContextRecord->Pc; #elif defined(_M_AMD64) - address pc = (address) exceptionInfo->ContextRecord->Rip; + address pc = (address) exceptionInfo->ContextRecord->Rip; #else - address pc = (address) exceptionInfo->ContextRecord->Eip; + address pc = (address) exceptionInfo->ContextRecord->Eip; #endif - Thread* t = Thread::current_or_null_safe(); + Thread* thread = Thread::current_or_null_safe(); - if (exception_code != EXCEPTION_BREAKPOINT) { - report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord, - exceptionInfo->ContextRecord); + if (exceptionCode != EXCEPTION_BREAKPOINT) { + report_error(thread, exceptionCode, pc, exceptionInfo->ExceptionRecord, + exceptionInfo->ContextRecord); + } } -exit: + return previousUnhandledExceptionFilter ? previousUnhandledExceptionFilter(exceptionInfo) : EXCEPTION_CONTINUE_SEARCH; } #endif diff --git a/src/hotspot/os/windows/symbolengine.cpp b/src/hotspot/os/windows/symbolengine.cpp index f178c3648b4..40c11b9e54d 100644 --- a/src/hotspot/os/windows/symbolengine.cpp +++ b/src/hotspot/os/windows/symbolengine.cpp @@ -111,7 +111,7 @@ class SimpleBufferWithFallback { _p = _fallback_buffer; _capacity = (int)(sizeof(_fallback_buffer) / sizeof(T)); } - _p[0] = '\0'; + _p[0] = 0; imprint_sentinel(); } @@ -123,7 +123,7 @@ class SimpleBufferWithFallback { } _p = _fallback_buffer; _capacity = (int)(sizeof(_fallback_buffer) / sizeof(T)); - _p[0] = '\0'; + _p[0] = 0; imprint_sentinel(); } diff --git a/src/hotspot/share/memory/allocation.cpp b/src/hotspot/share/memory/allocation.cpp index 64b00a13694..120d0df5358 100644 --- a/src/hotspot/share/memory/allocation.cpp +++ b/src/hotspot/share/memory/allocation.cpp @@ -111,7 +111,7 @@ void* ArenaObj::operator new(size_t size, Arena *arena) throw() { // AnyObj // -void* AnyObj::operator new(size_t size, Arena *arena) throw() { +void* AnyObj::operator new(size_t size, Arena *arena) { address res = (address)arena->Amalloc(size); DEBUG_ONLY(set_allocation_type(res, ARENA);) return res;