--- old/src/hotspot/share/gc/shared/referenceProcessor.hpp 2018-09-28 16:47:33.676805924 +0200 +++ new/src/hotspot/share/gc/shared/referenceProcessor.hpp 2018-09-28 16:47:33.535809161 +0200 @@ -143,13 +143,13 @@ inline size_t removed() const { return _removed; } inline void move_to_next() { - if (_current_discovered == _next_discovered) { + if (oopDesc::unsafe_equals(_current_discovered, _next_discovered)) { // End of the list. _current_discovered = NULL; } else { _current_discovered = _next_discovered; } - assert(_current_discovered != _first_seen, "cyclic ref_list found"); + assert(! oopDesc::unsafe_equals(_current_discovered, _first_seen), "cyclic ref_list found"); _processed++; } };