United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6820510 assertion failure with unloaded class in subnode.cpp
JDK-6820510 : assertion failure with unloaded class in subnode.cpp

Details
Type:
Bug
Submit Date:
2009-03-21
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs15
Fixed Versions:
hs15 (b05)

Related Reports
Backport:
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
While running CTW against some new jars I hit a new assertion with missing checks for unloaded classes.

## To suppress the following error report, specify this argument
## after -XX: or in .hotspotrc:  SuppressErrorAt=/ciInstanceKlass.hpp:112
##
## A fatal error has been detected by the Java Runtime Environment:
##
##  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/ci/ciInstanceKlass.hpp:112), pid=11281, tid=10
##  Error: assert(is_loaded(),"must be loaded")
##
## JRE version: 7.0-b50
## Java VM: Java HotSpot(TM) Server VM (15.0-b02-fastdebug mixed mode solaris-sparc )
## An error report file with more information is saved as:
## /tmp/multictw.sparc/run_ctw_b/workdir/hs_err_pid11281.log
##
## If you would like to submit a bug report, please visit:
##   http:java.sun.com/webapps/bugreport/crash.jsp

These are the jars that failed and they will soon be part of our internal collection of testing jar files.

castor-1.0.5.jar
cxf-2.0.1-incubator.jar
hibernate3.jar
jaxb-xjc-2.0.5.jar
jaxb-xjc-2.0.jar
jaxb-xjc.jar
org-netbeans-core-output2.jar
org-netbeans-core-windows.jar
org.eclipse.compare_3.3.0.I20070606.jar
org.eclipse.emf.ecore.xmi_2.3.0.v200706262000.jar
org.eclipse.jdt.ui_3.3.0.v20070607-0010.jar
org.eclipse.jface.text_3.3.0.v20070606-0010.jar
org.eclipse.team.core_3.3.0.I20070607.jar
org.eclipse.wst.common.emf_1.1.103.v200706071630.jar
org.eclipse.wst.common.project.facet.ui_1.2.0.v200706071742.jar

                                    

Comments
EVALUATION

There are some is_interface calls that are missing checks for is_loaded().
                                     
2009-03-21
SUGGESTED FIX

diff --git a/src/share/vm/opto/subnode.cpp b/src/share/vm/opto/subnode.cpp
--- a/src/share/vm/opto/subnode.cpp                                                                                                  
+++ b/src/share/vm/opto/subnode.cpp                                                                                                  
@@ -639,8 +639,8 @@ const Type *CmpPNode::sub( const Type *t
     int kps = (p0->isa_klassptr()?1:0) + (p1->isa_klassptr()?1:0);
     if (klass0 && klass1 &&
         kps != 1 &&             // both or neither are klass pointers
-        !klass0->is_interface() && // do not trust interfaces
-        !klass1->is_interface()) {
+        klass0->is_loaded() && !klass0->is_interface() && // do not trust interfaces
+        klass1->is_loaded() && !klass1->is_interface()) {
       bool unrelated_classes = false;
       // See if neither subclasses the other, or if the class on top
       // is precise.  In either of these cases, the compare is known
                                     
2009-03-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/90a66aa50514
                                     
2009-03-25



Hardware and Software, Engineered to Work Together