--- a/src/hotspot/share/gc/shared/space.cpp Mon Oct 16 20:22:41 2017 +0000
+++ b/src/hotspot/share/gc/shared/space.cpp Mon Oct 16 22:36:06 2017 -0400
@@ -631,7 +631,7 @@
HeapWord* obj = top();
if (pointer_delta(end(), obj) >= size) {
HeapWord* new_top = obj + size;
- HeapWord* result = (HeapWord*)Atomic::cmpxchg_ptr(new_top, top_addr(), obj);
+ HeapWord* result = Atomic::cmpxchg(new_top, top_addr(), obj);
// result can be one of two:
// the old top value: the exchange succeeded
// otherwise: the new value of the top is returned.