--- old/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp 2014-12-03 13:26:04.210147429 +0100 +++ new/src/share/vm/gc_implementation/g1/g1EvacFailure.hpp 2014-12-03 13:26:04.145145525 +0100 @@ -32,6 +32,7 @@ #include "gc_implementation/g1/g1OopClosures.inline.hpp" #include "gc_implementation/g1/heapRegion.hpp" #include "gc_implementation/g1/heapRegionRemSet.hpp" +#include "oops/markOop.inline.hpp" #include "utilities/workgroup.hpp" // Closures and tasks associated with any self-forwarding pointers @@ -120,7 +121,9 @@ _last_gap_threshold = _hr->cross_threshold(_end_of_last_gap, obj_addr); } - if (obj->is_forwarded() && obj->forwardee() == obj) { + markOop m = obj->mark(); + if (m->is_marked() && ((oop)m->decode_pointer() == obj)) { + // The object failed to move. // We consider all objects that we find self-forwarded to be