--- old/src/hotspot/share/utilities/bitMap.inline.hpp 2019-11-21 11:55:42.713502603 +0100 +++ new/src/hotspot/share/utilities/bitMap.inline.hpp 2019-11-21 11:55:42.457498276 +0100 @@ -72,7 +72,7 @@ if (new_val == old_val) { return false; // Someone else beat us to it. } - const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val, memory_order); + const bm_word_t cur_val = Atomic::cmpxchg(addr, old_val, new_val, memory_order); if (cur_val == old_val) { return true; // Success. } @@ -91,7 +91,7 @@ if (new_val == old_val) { return false; // Someone else beat us to it. } - const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val, memory_order); + const bm_word_t cur_val = Atomic::cmpxchg(addr, old_val, new_val, memory_order); if (cur_val == old_val) { return true; // Success. }