--- old/src/share/vm/ci/ciObjectFactory.hpp 2015-10-08 22:15:38.314527391 +0200 +++ new/src/share/vm/ci/ciObjectFactory.hpp 2015-10-08 22:15:38.240529158 +0200 @@ -27,6 +27,7 @@ #include "ci/ciClassList.hpp" #include "ci/ciObject.hpp" +#include "gc/shared/barrierSet.hpp" #include "utilities/growableArray.hpp" // ciObjectFactory @@ -78,6 +79,11 @@ void ensure_metadata_alive(ciMetadata* m); static bool is_equal(NonPermObject* p, oop key) { + // Shenandoah: We already force-forwarded the key earlier. + // The oop in the object should always point to to-space. + assert(key == oopDesc::bs()->read_barrier(key), "should be forwarded"); + assert(p->object()->get_oop() == oopDesc::bs()->read_barrier(p->object()->get_oop()), + "should be forwarded"); return p->object()->get_oop() == key; }