United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7009346 java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp
JDK-7009346 : java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp

Details
Type:
Bug
Submit Date:
2010-12-28
Status:
Closed
Updated Date:
2012-02-01
Project Name:
JDK
Resolved Date:
2011-05-10
Component:
hotspot
OS:
solaris
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs21 (b11)

Related Reports
Backport:
Relates:

Sub Tasks

Description
(this bug can be a duplicate of 7009361)

Test java/dyn/InvokeDynamicPrintArgs.java fails with NullPointerException when started on solaris-sparc (32/64) with -Xcomp option:

Printing some argument lists, starting with a empty one:
[InvokeDynamicPrintArgs, nothing, ()void][]
java.lang.NullPointerException
        at InvokeDynamicPrintArgs.main(InvokeDynamicPrintArgs.java:47)

Most probably, NullPointerException is thrown after call to the BSM (I tried to add debug prints). Also I tried to invoke target method right in the BSM and it was executed normally.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/d934e4b931e9
                                     
2011-04-20
EVALUATION

7009346: java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp
Reviewed-by: kvn, jrose, twisti

The invokespecial method handle adapter attempts to null check its
argument before the invoke but it's reading the wrong value so it
occasionally throws a spurious NPE.  The fix is to make it look like
all the other method handle code that's loading the receiver.  Tested
with failing test case.
                                     
2011-04-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/d934e4b931e9
                                     
2011-05-05



Hardware and Software, Engineered to Work Together