hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp
changeset 11202 6be05533238b
parent 9994 efb74fdbd46e
child 11584 e1df4d08a1f4
--- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp	Tue Nov 22 14:59:34 2011 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp	Fri Dec 02 12:39:23 2011 -0800
@@ -84,8 +84,11 @@
       // slightly paranoid test; I'm trying to catch potential
       // problems before we go into push_on_queue to know where the
       // problem is coming from
-      assert(obj == oopDesc::load_decode_heap_oop(p),
-             "p should still be pointing to obj");
+      assert((obj == oopDesc::load_decode_heap_oop(p)) ||
+             (obj->is_forwarded() &&
+                 obj->forwardee() == oopDesc::load_decode_heap_oop(p)),
+             "p should still be pointing to obj or to its forwardee");
+
       _par_scan_state->push_on_queue(p);
     } else {
       _par_scan_state->update_rs(_from, p, _par_scan_state->queue_num());