src/hotspot/share/interpreter/bytecodeInterpreter.cpp
changeset 59252 623722a6aeb9
parent 59069 e0d59f0c2b7d
--- 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;