JDK-6794939 : assert(_base == OopPtr,"subclass must override cast_to_ptr_type")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs15
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-01-16
  • 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
6u18Fixed 7Fixed hs15Fixed
% cat ./test.list
nsk/stress/jck12a/jck12a012     execute_positive        stress,diehard,slow
nsk/stress/jck60/jck60015       execute_positive        stress,slow
nsk/stress/jck60/jck60016       execute_positive        stress,slow
nsk/stress/jck60/jck60025       execute_positive        stress,slow
nsk/stress/jck60/jck60026       execute_positive        stress,slow

% /net/jano2/export2/serviceability/tools/bin/runnsk -remove-pass -both -server -XX:CompileThreshold=2 ./test.list -jdk /export/kvn/jdk6u6p -tongajdk /export/kvn/jdk6u6p

nsk/stress/jck60/jck60025 FAILED

# after -XX: or in .hotspotrc:  SuppressErrorAt=/type.cpp:3670
# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (/net/dhcp-usca22-158-108/export/home/kvn/work2/hg/6790209/src/share/vm/opto/type.cpp:3670), pid=15600, tid=16
#  Error: assert(_base == OopPtr,"subclass must override cast_to_ptr_type")
# JRE version: 6.0_06-b04
# Java VM: OpenJDK Server VM (15.0-b01-internal-fastdebug mixed mode solaris-x86 )
Current thread (0x08211400):  JavaThread "CompilerThread1" daemon [_thread_in_native, id=16, stack(0xb490f000,0xb494f000)] 
Stack: [0xb490f000,0xb494f000],  sp=0xb494c240,  free space=244k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
V  [libjvm.so+0x15d0822] void VMError::report(outputStream*) + 0x5ae
V  [libjvm.so+0x15d1815] void VMError::report_and_die() + 0x58d
V  [libjvm.so+0x765f2d] void report_assertion_failure(const char*,int,const char*) + 0x61
V  [libjvm.so+0x150cb1b] const Type*TypeKlassPtr::cast_to_ptr_type(TypePtr::PTR)const + 0x47
V  [libjvm.so+0x1508535] const Type*TypeOopPtr::filter(const Type*)const + 0x1f9

EVALUATION The fix has been verified as part of hs15-b02 pit.

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/465813e0303a

EVALUATION Typo in const Type *TypeKlassPtr::cast_to_ptr_type(PTR ptr) const { assert(_base == OopPtr, "subclass must override cast_to_ptr_type"); Should be _base == KlassPtr

SUGGESTED FIX Change the assert's check to _base == KlassPtr.