< prev index next >

src/share/vm/memory/cardTableModRefBS.cpp

Print this page
rev 7400 : 8059066: CardTableModRefBS might commit the same page twice (01)

@@ -274,12 +274,13 @@
     // 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(),
< prev index next >