--- old/src/hotspot/share/runtime/mutex.cpp 2017-10-12 12:06:27.811626047 -0400 +++ new/src/hotspot/share/runtime/mutex.cpp 2017-10-12 12:06:27.436012059 -0400 @@ -457,7 +457,7 @@ OrderAccess::fence(); // Optional optimization ... try barging on the inner lock - if ((NativeMonitorFlags & 32) && Atomic::cmpxchg_if_null(ESelf, &_OnDeck)) { + if ((NativeMonitorFlags & 32) && Atomic::cmpxchg(ESelf, &_OnDeck, (ParkEvent*)NULL) == NULL) { goto OnDeck_LOOP; } @@ -564,7 +564,7 @@ // Unlike a normal lock, however, the exiting thread "locks" OnDeck, // picks a successor and marks that thread as OnDeck. That successor // thread will then clear OnDeck once it eventually acquires the outer lock. - if (!Atomic::cmpxchg_if_null((ParkEvent*)_LBIT, &_OnDeck)) { + if (Atomic::cmpxchg((ParkEvent*)_LBIT, &_OnDeck, (ParkEvent*)NULL) != NULL) { return; }