6786346: intermittent Internal Error (src/share/vm/memory/cardTableModRefBS.cpp:226)

Tue, 17 Feb 2009 15:35:58 -0800

author
jmasa
date
Tue, 17 Feb 2009 15:35:58 -0800
changeset 1016
9e5a6ed08fc9
parent 984
fe3d7c11b4b7
child 1017
a0576ae7045f

6786346: intermittent Internal Error (src/share/vm/memory/cardTableModRefBS.cpp:226)
Summary: Two assertions were incorrectly composed.
Reviewed-by: tonyp

src/share/vm/memory/cardTableModRefBS.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/memory/cardTableModRefBS.cpp	Tue Feb 10 18:39:09 2009 +0300
     1.2 +++ b/src/share/vm/memory/cardTableModRefBS.cpp	Tue Feb 17 15:35:58 2009 -0800
     1.3 @@ -217,15 +217,28 @@
     1.4        (HeapWord*) align_size_up((uintptr_t)new_end, _page_size);
     1.5      assert(new_end_aligned >= (HeapWord*) new_end,
     1.6             "align up, but less");
     1.7 +    // Check the other regions (excludes "ind") to ensure that
     1.8 +    // the new_end_aligned does not intrude onto the committed
     1.9 +    // space of another region.
    1.10      int ri = 0;
    1.11      for (ri = 0; ri < _cur_covered_regions; ri++) {
    1.12        if (ri != ind) {
    1.13          if (_committed[ri].contains(new_end_aligned)) {
    1.14 -          assert((new_end_aligned >= _committed[ri].start()) &&
    1.15 -                 (_committed[ri].start() > _committed[ind].start()),
    1.16 +          // The prior check included in the assert
    1.17 +          // (new_end_aligned >= _committed[ri].start())
    1.18 +          // is redundant with the "contains" test.
    1.19 +          // Any region containing the new end
    1.20 +          // should start at or beyond the region found (ind)
    1.21 +          // for the new end (committed regions are not expected to
    1.22 +          // be proper subsets of other committed regions).
    1.23 +          assert(_committed[ri].start() >= _committed[ind].start(),
    1.24                   "New end of committed region is inconsistent");
    1.25            new_end_aligned = _committed[ri].start();
    1.26 -          assert(new_end_aligned > _committed[ind].start(),
    1.27 +          // new_end_aligned can be equal to the start of its
    1.28 +          // committed region (i.e., of "ind") if a second
    1.29 +          // region following "ind" also start at the same location
    1.30 +          // as "ind".
    1.31 +          assert(new_end_aligned >= _committed[ind].start(),
    1.32              "New end of committed region is before start");
    1.33            debug_only(collided = true;)
    1.34            // Should only collide with 1 region

mercurial