--- old/src/share/vm/gc/g1/heapRegion.cpp 2015-11-03 17:15:25.552159726 +0100 +++ new/src/share/vm/gc/g1/heapRegion.cpp 2015-11-03 17:15:25.468159309 +0100 @@ -695,8 +695,7 @@ HeapRegion* to = _g1h->heap_region_containing(obj); if (from != NULL && to != NULL && from != to && - !to->is_pinned() && - !from->is_continues_humongous()) { + !to->is_pinned()) { jbyte cv_obj = *_bs->byte_for_const(_containing_obj); jbyte cv_field = *_bs->byte_for_const(p); const jbyte dirty = CardTableModRefBS::dirty_card_val(); @@ -808,6 +807,13 @@ _offsets.verify(); } + if (is_region_humongous) { + oop obj = oop(this->humongous_start_region()->bottom()); + if ((HeapWord*)obj > bottom() || (HeapWord*)obj + obj->size() < bottom()) { + gclog_or_tty->print_cr("this humongous region is not part of its' humongous object " PTR_FORMAT, p2i(obj)); + } + } + if (!is_region_humongous && p != top()) { gclog_or_tty->print_cr("end of last object " PTR_FORMAT " " "does not match top " PTR_FORMAT, p2i(p), p2i(top())); @@ -906,6 +912,7 @@ } void G1OffsetTableContigSpace::set_end(HeapWord* new_end) { + assert(new_end == _bottom + HeapRegion::GrainWords, "set_end should only ever be set to _bottom + HeapRegion::GrainWords"); Space::set_end(new_end); _offsets.resize(new_end - bottom()); }