diff -r 4cbfa5077d68 -r 623722a6aeb9 src/hotspot/share/interpreter/bytecodeInterpreter.cpp --- a/src/hotspot/share/interpreter/bytecodeInterpreter.cpp Mon Nov 25 12:32:40 2019 +0100 +++ b/src/hotspot/share/interpreter/bytecodeInterpreter.cpp Mon Nov 25 12:33:15 2019 +0100 @@ -2163,7 +2163,7 @@ HeapWord* compare_to = *Universe::heap()->top_addr(); HeapWord* new_top = compare_to + obj_size; if (new_top <= *Universe::heap()->end_addr()) { - if (Atomic::cmpxchg(new_top, Universe::heap()->top_addr(), compare_to) != compare_to) { + if (Atomic::cmpxchg(Universe::heap()->top_addr(), compare_to, new_top) != compare_to) { goto retry; } result = (oop) compare_to;