--- old/src/hotspot/share/services/attachListener.hpp 2019-11-21 11:55:40.629467375 +0100 +++ new/src/hotspot/share/services/attachListener.hpp 2019-11-21 11:55:40.373463047 +0100 @@ -95,7 +95,7 @@ static AttachListenerState transit_state(AttachListenerState new_state, AttachListenerState cmp_state) { - return Atomic::cmpxchg(new_state, &_state, cmp_state); + return Atomic::cmpxchg(&_state, cmp_state, new_state); } static bool is_initialized() {