JDK-7009346 : java/dyn/InvokeDynamicPrintArgs.java fails with NPE on solaris-sparc with -Xcomp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2010-12-28
  • Updated: 2012-02-01
  • Resolved: 2011-05-10
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 7 Other
7Fixed hs21Fixed
Related Reports
Relates :  
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-rt/hotspot/rev/d934e4b931e9
05-05-2011

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.
21-04-2011

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