JDK-6958485 : fix for 6879921 was insufficient
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2010-06-04
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Related Reports
Relates :  
Description
6879921 fix a case where it the superword optimization was attempting to handle arrays of oops which we didn't allow.  A guard was inserted in stmts_can_pack which fixed the original issue.  Testing with bigapps has shown that there are other paths where this problem can manifest.  In particular this pattern:

    public static void init(Object src[], boolean[] dst) {
        // initialize the arrays                                                                                                                      
        for (int i =0; i<src.length; i++) {
            dst[i] = src[i] != null ? false : true;
        }
    }

shows that are_adjacent_refs can be reached through est_savings, skipping the added is_java_primitive guard.  The fix is to move the is_java_primitive into are_adjacent_refs to guard the data_size calls.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/49fac4acd688
08-06-2010