--- old/src/hotspot/share/utilities/concurrentHashTable.inline.hpp 2019-11-21 11:58:38.372470141 +0100 +++ new/src/hotspot/share/utilities/concurrentHashTable.inline.hpp 2019-11-21 11:58:37.896462104 +0100 @@ -145,7 +145,7 @@ if (is_locked()) { return false; } - if (Atomic::cmpxchg(node, &_first, expect) == expect) { + if (Atomic::cmpxchg(&_first, expect, node) == expect) { return true; } return false; @@ -160,7 +160,7 @@ } // We will expect a clean first pointer. Node* tmp = first(); - if (Atomic::cmpxchg(set_state(tmp, STATE_LOCK_BIT), &_first, tmp) == tmp) { + if (Atomic::cmpxchg(&_first, tmp, set_state(tmp, STATE_LOCK_BIT)) == tmp) { return true; } return false;