JDK-7192406 : JSR 292: C2 needs exact return type information for invokedynamic and invokehandle call sites
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-17
  • Updated: 2013-06-26
  • Resolved: 2012-09-05
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 JDK 8 Other
7u40Resolved 8Fixed hs24Fixed
Related Reports
Relates :  
Description
When invokedynamic and invokehandle call sites are linked the target is a method handle adapter (static method) with a type erased signature.  This also means the return type of the method is now java.lang.Object while in reality it's a more concrete type.

In certain situations with inlining this can cause type mismatches.

Nashorn revision:

changeset:   2266:d151cc49ad86
tag:         tip
user:        lagergren
date:        Wed May 16 18:43:17 2012 +0200
summary:     removed debug printout

has exactly this problem.  Running any test like crypto shows this behavior:

$ java -jar dist/nashorn.jar test/performance/runcrypto.js
...

#  Internal Error (/home/cthaling/7192167/src/share/vm/opto/parse3.cpp:125), pid=22819, tid=2807036784
#  assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/7f813940ac35
29-08-2012