# HG changeset patch # User ehelin # Date 1416844932 -3600 # Mon Nov 24 17:02:12 2014 +0100 # Node ID 16a3d9384e1e2ddfa03c5e1f1184a540ef37bcca # Parent 3295daef265bab897d9a95279819e74196c02f33 8059066: CardTableModRefBS might commit the same page twice (01) diff --git a/src/share/vm/memory/cardTableModRefBS.cpp b/src/share/vm/memory/cardTableModRefBS.cpp --- a/src/share/vm/memory/cardTableModRefBS.cpp +++ b/src/share/vm/memory/cardTableModRefBS.cpp @@ -271,18 +271,19 @@ void CardTableModRefBS::resize_covered_r (HeapWord*) align_size_up((uintptr_t)new_end, _page_size); assert(new_end_aligned >= (HeapWord*) new_end, "align up, but less"); // Check the other regions (excludes "ind") to ensure that // the new_end_aligned does not intrude onto the committed // space of another region. int ri = 0; for (ri = ind + 1; ri < _cur_covered_regions; ri++) { - if (new_end_aligned > _committed[ri].start() && - new_end_aligned <= _committed[ri].end()) { + if (new_end_aligned > _committed[ri].start()) { + assert(new_end_aligned <= _committed[ri].end(), + "An earlier committed region can't cover a later committed region"); // Any region containing the new end // should start at or beyond the region found (ind) // for the new end (committed regions are not expected to // be proper subsets of other committed regions). assert(_committed[ri].start() >= _committed[ind].start(), "New end of committed region is inconsistent"); new_end_aligned = _committed[ri].start(); // new_end_aligned can be equal to the start of its