JDK-6820510 : assertion failure with unloaded class in subnode.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs15
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2009-03-21
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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
6-poolResolved 7Fixed hs15Fixed
Related Reports
Relates :  
Relates :  
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 http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/90a66aa50514
25-03-2009

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

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
21-03-2009