--- old/src/hotspot/os/windows/os_windows.cpp 2017-10-27 16:15:46.594577426 -0400 +++ new/src/hotspot/os/windows/os_windows.cpp 2017-10-27 16:15:46.115979458 -0400 @@ -3656,7 +3656,7 @@ static INIT_ONCE init_once_crit_sect = INIT_ONCE_STATIC_INIT; static CRITICAL_SECTION crit_sect; - static volatile int process_exiting = 0; + static volatile DWORD process_exiting = 0; int i, j; DWORD res; HANDLE hproc, hthr; @@ -3675,7 +3675,7 @@ if (what != EPT_THREAD) { // Atomically set process_exiting before the critical section // to increase the visibility between racing threads. - Atomic::cmpxchg((int)GetCurrentThreadId(), &process_exiting, 0); + Atomic::cmpxchg(GetCurrentThreadId(), &process_exiting, (DWORD)0); } EnterCriticalSection(&crit_sect); @@ -3793,7 +3793,7 @@ if (!registered && OrderAccess::load_acquire(&process_exiting) != 0 && - process_exiting != (jint)GetCurrentThreadId()) { + process_exiting != GetCurrentThreadId()) { // Some other thread is about to call exit(), so we don't let // the current unregistered thread proceed to exit() or _endthreadex() while (true) {