--- old/src/hotspot/share/oops/symbol.cpp 2019-11-21 11:55:33.257342754 +0100 +++ new/src/hotspot/share/oops/symbol.cpp 2019-11-21 11:55:33.005338493 +0100 @@ -281,7 +281,7 @@ } else if (refc == 0) { return false; // dead, can't revive. } else { - found = Atomic::cmpxchg(old_value + 1, &_length_and_refcount, old_value); + found = Atomic::cmpxchg(&_length_and_refcount, old_value, old_value + 1); if (found == old_value) { return true; // successfully updated. } @@ -324,7 +324,7 @@ #endif return; } else { - found = Atomic::cmpxchg(old_value - 1, &_length_and_refcount, old_value); + found = Atomic::cmpxchg(&_length_and_refcount, old_value, old_value - 1); if (found == old_value) { return; // successfully updated. } @@ -348,7 +348,7 @@ return; } else { int len = extract_length(old_value); - found = Atomic::cmpxchg(pack_length_and_refcount(len, PERM_REFCOUNT), &_length_and_refcount, old_value); + found = Atomic::cmpxchg(&_length_and_refcount, old_value, pack_length_and_refcount(len, PERM_REFCOUNT)); if (found == old_value) { return; // successfully updated. }