--- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Fri Dec 02 21:10:45 2011 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.inline.hpp Mon Dec 05 12:26:40 2011 -0500
@@ -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());