United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7121073 secondary_super_cache memory slice has incorrect bounds in flatten_alias_type
JDK-7121073 : secondary_super_cache memory slice has incorrect bounds in flatten_alias_type

Details
Type:
Bug
Submit Date:
2011-12-13
Status:
Closed
Updated Date:
2012-03-29
Project Name:
JDK
Resolved Date:
2012-03-29
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23 (b10)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The logic for smearing the type checking slice into a single slice has incorrect bounds because of partial removal of sizeof(klassOopDesc)

    uint off2 = offset - Klass::primary_supers_offset_in_bytes();
    if( offset == Type::OffsetBot ||
        off2 < Klass::primary_super_limit()*wordSize ) {
      offset = sizeof(oopDesc) +Klass::secondary_super_cache_offset_in_bytes();
      tj = tk = TypeKlassPtr::make( TypePtr::NotNull, tk->klass(), offset );
    }
  }

off2 should also be subtracting sizeof(klassOopDesc)

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/669f6a7d5b70
                                     
2011-12-20
EVALUATION

7121073: secondary_super_cache memory slice has incorrect bounds in flatten_alias_type
Reviewed-by: kvn

To ensure that memory operations for type checks are properly ordered,
several fields are smeared together into the same alias slice.  The
existing logic is sloppy and includes a slightly larger chunk of
memory than intended.  Currently this is fine but changes to the shape
of Klass can invalidate it.  The fix is to properly test the
boundaries.  Additionally I changed the logic for setting the PTR to
use NotNull instead of Constant to be consisten with all the following
logic which uses NotNull.  Tested with full CTW.
                                     
2012-01-10
EVALUATION

Verified in PIT HS23b10 for JDK8:
not verified: doesn't need special testing
                                     
2012-01-17
EVALUATION

Verified in PIT HS23b10 for JDK7u4:
not verified: doesn't need special testing
                                     
2012-01-17
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/669f6a7d5b70
                                     
2012-03-22



Hardware and Software, Engineered to Work Together