src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp

Print this page
rev 2755 : 7097516: G1: assert(0<= from_card && from_card<HeapRegion::CardsPerRegion) failed: Must be in range.
Summary: Introduced a version of is_in_reserved() that looks at _orig_end as opposed to _end.
Reviewed-by: tonyp

*** 141,151 **** HeapRegion* loc_hr = hr(); // If the test below fails, then this table was reused concurrently // with this operation. This is OK, since the old table was coarsened, // and adding a bit to the new table is never incorrect. ! if (loc_hr->is_in_reserved(from)) { size_t hw_offset = pointer_delta((HeapWord*)from, loc_hr->bottom()); CardIdx_t from_card = (CardIdx_t) hw_offset >> (CardTableModRefBS::card_shift - LogHeapWordSize); assert(0 <= from_card && (size_t)from_card < HeapRegion::CardsPerRegion, --- 141,155 ---- HeapRegion* loc_hr = hr(); // If the test below fails, then this table was reused concurrently // with this operation. This is OK, since the old table was coarsened, // and adding a bit to the new table is never incorrect. ! // If the table used to belong to a humongous continues region and is ! // now reused for the corresponding humongous start region, we need to ! // make sure that we detect this. Thus, we call is_in_reserved_raw() ! // instead of just is_in_reserved() here. ! if (loc_hr->is_in_reserved_raw(from)) { size_t hw_offset = pointer_delta((HeapWord*)from, loc_hr->bottom()); CardIdx_t from_card = (CardIdx_t) hw_offset >> (CardTableModRefBS::card_shift - LogHeapWordSize); assert(0 <= from_card && (size_t)from_card < HeapRegion::CardsPerRegion,