United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6843292 "Expect to be beyond new region unless impacting another region" assertion too strong
6843292 : "Expect to be beyond new region unless impacting another region" assertion too strong

Details
Type:
Bug
Submit Date:
2009-05-20
Status:
Closed
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2010-01-15
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs16

Related Reports
Backport:
Backport:

Sub Tasks

Description
The assertion in share/vm/memory/cardTableModRefBS.cpp in method
CardTableModRefBS::resize_covered_region()


    // This line commented out cleans the newly expanded region and
    // not the aligned up expanded region.
    // jbyte* const end = byte_after(new_region.last());
    jbyte* const end = (jbyte*) new_end_for_commit;
    assert((end >= byte_after(new_region.last())) || collided,
      "Expect to be beyond new region unless impacting another region");

is too strong.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/ff004bcd2596
                                     
2009-08-06
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/ff004bcd2596
                                     
2009-08-03
SUGGESTED FIX

// The guard page is always committed and should not be committed over.
!     // "guarded" is used for assertion checking below and recalls the fact
!     // that the would-be end of the new committed region would have
!     // penetrated the guard page.
!     HeapWord* new_end_for_commit = new_end_aligned;
! 
!     debug_only(bool guarded = false;)
!     if (new_end_for_commit > _guard_region.start()) {
!       new_end_for_commit = _guard_region.start();
!       debug_only(guarded = true;)
!     }


      assert(index_for(new_region.last()) < (int) _guard_index,
        "The guard card will be overwritten");
!     // This line commented out cleans the newly expanded region and
!     // not the aligned up expanded region.
!     // jbyte* const end = byte_after(new_region.last());
!     jbyte* const end = (jbyte*) new_end_for_commit;
!     assert((end >= byte_after(new_region.last())) || collided || guarded,
!       "Expect to be beyond new region unless impacting another region");
                                     
2009-05-20
EVALUATION

Relax the assertion to allow for the limitation on new_end_for_commit due to the
presence of the guard page.
                                     
2009-05-20



Hardware and Software, Engineered to Work Together