United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7041244 JSR 292: Server VM gets a SEGV running a JCK test
JDK-7041244 : JSR 292: Server VM gets a SEGV running a JCK test

Details
Type:
Bug
Submit Date:
2011-05-02
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-05-16
Component:
hotspot
OS:
windows_xp
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs21 (b12)

Related Reports
Backport:
Relates:

Sub Tasks

Description
Run this command on solaris-sparc:
/java/re/jdk/7/promoted/all/b140/binaries/solaris-sparc/bin/java \
 -jar /java/re/jck/7/promoted/latest/binaries/JCK-compiler-7/lib/jtjck.jar \
 -nojtx \
 -jdk /java/re/jdk/7/promoted/all/b140/binaries/solaris-sparc \
 -vmoptions:-Xss2m -Xms32m -Xmx1024m \
 -refvmoptions:-Xss2m -Xms32m -Xmx1024m \
 -w:./result \
 lang/EXPR/expr751/expr75101m5/expr75101m5.java 

and get the SEGV shown in the attached log file.

                                    

Comments
SUGGESTED FIX

The fix is to not use O0 as a temporary register but O3 which is also free at this point.
                                     
2011-05-03
EVALUATION

$ gamma -XX:+ShowMessageBoxOnError -Xint -cp result/classes/ javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5
Using java runtime at: /tmp/twisti/build/hotspot-comp/7041244/build/jdk-solaris-sparc/debug/jre
VM option '+ShowMessageBoxOnError'
Unexpected exception for the call: handle.invokeGeneric(null, null);
java.lang.NullPointerException
        at java.lang.invoke.FromGeneric$A5.invoke_I5(FromGeneric.java:565)
        at java.lang.invoke.FilterGeneric$F4.invoke_F2(FilterGeneric.java:612)
        at javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.run(expr75101m5.java:109)
        at javasoft.sqe.tests.lang.expr751.expr75101m5.expr75101m5.main(expr75101m5.java:24)
==============================================================================
Unexpected Error
------------------------------------------------------------------------------
SIGSEGV (0xb) at pc=0xfb4d5434, pid=25789, tid=2

Do you want to debug the problem?

To debug, run 'dbx - 25789'; then switch to thread 2
Enter 'yes' to launch dbx automatically (PATH must include dbx)
Otherwise, press RETURN to abort...
==============================================================================

...

(dbx) fr 10
0xfb4d5434:     ld       [%g4 + %o0], %o1
(dbx) p findpc($pc)
dbx: warning: unknown language, 'c' assumed
dbx: internal warning: don't know how to convert to integral type from
pointer (null)
 base integer $int

"Executing findpc"
MethodHandle::adapter_check_cast [0xfb4d5394, 0xfb4d5484[ (240 bytes)
findpc($pc) = (void)
(dbx) regs
current thread: t@2
current frame:  [10]
g0-g1    0x00000000 0x00000000 0x00000000 0x00000000
g2-g3    0x00000000 0x00044c00 0x00000000 0xe588fc98
g4-g5    0x00000000 0xfd7ff4a8 0x00000000 0xb7009418
g6-g7    0x00000000 0x00000000 0x00000000 0xfd940200
o0-o1    0x00000000 0xb70756f0 0x00000000 0xb707d5d8
o2-o3    0x00000000 0xe58008f0 0x00000000 0xfb42b960
o4-o5    0x00000000 0xfd7ff4b4 0x00000000 0xfd7ff448
o6-o7    0x00000000 0xfd7ff448 0x00000000 0xfb406488
l0-l1    0x00000000 0xfd7ff4a4 0x00000000 0xb72453fe
l2-l3    0x00000000 0xb7245440 0x00000000 0xfd7ff540
l4-l5    0x00000000 0xfd7ff4b8 0x00000000 0xfd7ff448
l6-l7    0x00000000 0xb7288680 0x00000000 0x00044c00
i0-i1    0x00000000 0xfd7ff540 0x00000000 0xfb412680
i2-i3    0x00000000 0x00000000 0x00000000 0xfb42b0c0
i4-i5    0x00000000 0xfd7ff548 0x00000000 0xfd7ff4d8
i6-i7    0x00000000 0xfd7ff4d0 0x00000000 0xfb406488
y        0x00000000 0xffffffff
ccr      0x00000000 0x00000000
pc       0x00000000 0xfb4d5434:0xfb4d5434    ld       [%g4 + %o0], %o1
npc      0x00000000 0xfb4d5438:0xfb4d5438    sethi    %hi(0xfb4d4c00), %o3
(dbx) 


O0 is destroyed during check_klass_subtype because it's used as a tempoarary register but may be used in the exception throwing path.
                                     
2011-05-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/8d944991dbf9
                                     
2011-05-04



Hardware and Software, Engineered to Work Together