United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6795465 Crash in assembler_sparc.cpp with client compiler on solaris-sparc
JDK-6795465 : Crash in assembler_sparc.cpp with client compiler on solaris-sparc

Details
Type:
Bug
Submit Date:
2009-01-20
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs14,hs16
Fixed Versions:
hs17 (b01)

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

Sub Tasks

Description
The following test

========= TesterSmall.java ===========

class TesterSmall_Class_0 {
    static long var_1 = -1;

    public TesterSmall_Class_0()
    {
        long var_2 = TesterSmall_Class_0.var_1 * 1;

        var_2 &= (long)(new byte[(byte)1E10])[(byte)~var_2];
    }
}

public class TesterSmall {
    public static void main(String[] args)
    {
        try {
            TesterSmall_Class_0 t = new TesterSmall_Class_0();
        } catch (Throwable e) {
          System.out.println("Got exception " + e);
        }
    }
}

======================================

crashes with SIGSEGV with latest hs14b10/jdk7b43 product jvm

JDK7b43/java -client -Xcomp -XX:CompileOnly=TesterSmall_Class_0 TesterSmall
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfe97ebd8, pid=9059, tid=2
#
# JRE version: 7.0-b43
# Java VM: Java HotSpot(TM) Client VM (14.0-b10 compiled mode solaris-sparc )
# Problematic frame:
# V  [libjvm.so+0x17ebd8]


and crashes with following assertion with fastdebug jvm

JDK7b43/java -client -Xcomp -XX:CompileOnly=TesterSmall_Class_0 TesterSmall
=============== DEBUG MESSAGE: assert(is an array klass) ================

# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/assembler_sparc.cpp:1982
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/export2/BUILD_AREA/jdk7/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp:1982), pid=13376, tid=2
#  Error: assert(false,"error")
#
# JRE version: 7.0-b43
# Java VM: Java HotSpot(TM) Client VM (14.0-b10-fastdebug compiled mode solaris-sparc )

---------------  T H R E A D  ---------------

Current thread (0x0003e000):  JavaThread "main" [_thread_in_Java, id=2, stack(0xfd300000,0xfd380000)]

Stack: [0xfd300000,0xfd380000],  sp=0xfd37f5c0,  free space=509k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xe0837c]
V  [libjvm.so+0x4b50e4]
V  [libjvm.so+0x16b224]
v  ~StubRoutines::stop_subroutine
v  ~RuntimeStub::new_type_array Runtime1 stub
v  ~RuntimeStub::new_type_array Runtime1 stub
j  TesterSmall.main([Ljava/lang/String;)V+4
v  ~StubRoutines::call_stub
V  [libjvm.so+0x640b1c]
V  [libjvm.so+0x677214]
V  [libjvm.so+0x69eab4]
C  [libjli.so+0x24d4]  JavaMain+0x2e8


The problem is not reproduced with server compiler and on other platforms.

                                    

Comments
EVALUATION

This is the same as the ARM/C1 issue 6757618.  The state_for calls are done after some fixed registers have already been setup and C1 doesn't properly handle them being killed.
                                     
2009-01-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/d0acbc302e14
                                     
2009-08-17
EVALUATION

On sparc this will only fail when hotspot is compiled with the SS12 compilers which means it only effects 1.7.  The test case doesn't fail on 1.6 so there's no need for a backport.  It will also fail reliably on 1.7, i.e. if anyone was seeing this we would have heard about it.
                                     
2009-08-18
EVALUATION

http://hg.openjdk.java.net/hsx/hsx16/baseline/rev/10ea1ed1400c
                                     
2009-09-02
EVALUATION

http://hg.openjdk.java.net/hsx/hsx16/master/rev/10ea1ed1400c
                                     
2009-09-04



Hardware and Software, Engineered to Work Together