diff -r 4cbfa5077d68 -r 623722a6aeb9 src/hotspot/share/utilities/bitMap.cpp --- a/src/hotspot/share/utilities/bitMap.cpp Mon Nov 25 12:32:40 2019 +0100 +++ b/src/hotspot/share/utilities/bitMap.cpp Mon Nov 25 12:33:15 2019 +0100 @@ -217,7 +217,7 @@ bm_word_t mr = inverted_bit_mask_for_range(beg, end); bm_word_t nw = value ? (w | ~mr) : (w & mr); while (true) { - bm_word_t res = Atomic::cmpxchg(nw, pw, w); + bm_word_t res = Atomic::cmpxchg(pw, w, nw); if (res == w) break; w = res; nw = value ? (w | ~mr) : (w & mr); @@ -640,7 +640,7 @@ table[i] = num_set_bits(i); } - if (!Atomic::replace_if_null(table, &_pop_count_table)) { + if (!Atomic::replace_if_null(&_pop_count_table, table)) { guarantee(_pop_count_table != NULL, "invariant"); FREE_C_HEAP_ARRAY(idx_t, table); }