JDK-7049415 : Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-05-28
  • Updated: 2015-06-15
  • Resolved: 2011-06-04
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
7Fixed 8Fixed hs21Fixed
Related Reports
Relates :  
Description
See comments.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/ba550512d3b2
09-06-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/ba550512d3b2
04-06-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/60b8287df30e
03-06-2011

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/60b8287df30e
02-06-2011

SUGGESTED FIX From: John Rose <###@###.###> Date: June 1, 2011 11:44:29 AM PDT To: hotspot compiler <###@###.###> Subject: review request (URGENT): 7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError Low-level fix to ensure wrapping of early linkage errors in bootstrap method errors, for invokedynamic corner cases. 7049415: Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError JVM Summary: Delegate invokedynamic linkage errors to MethodHandleNatives.raiseException. JDK Summary: Wrap invokedynamic linkage errors in BootstrapMethodError, as needed. http://cr.openjdk.java.net/~jrose/7049415/webrev.jvm.00 http://cr.openjdk.java.net/~jrose/7049415/webrev.jdk.00 These changes can integrate in any order. To fix the bug, both must be integrated. Test case attached. All paths have been exercised. -- John <Test 7049415.java>
01-06-2011

EVALUATION A corner case of a corner case, but covered by the JCK: If an invokedynamic instruction fails to link because a constant pool reference fails to resolve before the BSM is invoked, the JVM can fail to wrap the LinkageError inside a BootstrapMethodError (which is also a LinkageError). Thus, users who (a) have broken indy instructions and (b) are catching BSME (but not LE) will be surprised by a lack of spec. compliance. The fix is fairly simple: Cut into the JVM routine which resolves an invokedynamic instruction, and cause it to verify any LinkageError is in fact a BSME. If a stray LE is found, wrap it. We have to call up to Java to get the wrapping done. Ungraceful, but it works.
01-06-2011