-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b67
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082785 | emb-9 | Andreas Eriksson | P3 | Resolved | Fixed | team |
JDK-8129133 | 8u65 | Andreas Eriksson | P3 | Resolved | Fixed | b02 |
JDK-8081296 | 8u60 | Andreas Eriksson | P3 | Resolved | Fixed | b20 |
JDK-8137690 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b02 |
JDK-8129657 | emb-8u60 | Andreas Eriksson | P3 | Resolved | Fixed | b20 |
java.lang.IllegalAccessError: tried to access method C.m()V from class Exec
at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:965)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:990)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1385)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1726)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:442)
at Exec.invokeRef(Exec.java:4)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at Runner.run(Runner.java:15)
at Runner.main(Runner.java:4)
Expected behaviour:
java.lang.BootstrapMethodError: java.lang.IllegalAccessError: tried to access method C.m()V from class Exec
at Exec.invokeRef(Exec.java:4)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at Runner.run(Runner.java:15)
at Runner.main(Runner.java:4)
Caused by: java.lang.IllegalAccessError: tried to access method C.m()V from class Exec
at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:965)
at java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:990)
at java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:1385)
at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1726)
at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:442)
From the JVM specification section 6.5. Invokedynamic:
Linking Exceptions
If resolution of the symbolic reference to the call site specifier throws an exception E, the invokedynamic instruction throws a BootstrapMethodError that wraps E.
Otherwise, during the continuing resolution of the call site specifier, if invocation of the bootstrap method completes abruptly (§2.6.5) because of a throw of exception E, the invokedynamic instruction throws a BootstrapMethodError that wraps E. (This can occur if the bootstrap method has the wrong arity, parameter type, or return type, causing java.lang.invoke.MethodHandle . invoke to throw java.lang.invoke.WrongMethodTypeException.)
Otherwise, during the continuing resolution of the call site specifier, if the result from the bootstrap method invocation is not a reference to an instance of java.lang.invoke.CallSite, the invokedynamic instruction throws a BootstrapMethodError.
Otherwise, during the continuing resolution of the call site specifier, if the type descriptor of the target of the call site object is not semantically equal to the method descriptor in the call site specifier, the invokedynamic instruction throws a BootstrapMethodError.
- backported by
-
JDK-8081296 HotSpot fails to wrap Exceptions from invokedynamic in a BootstrapMethodError
-
- Resolved
-
-
JDK-8082785 HotSpot fails to wrap Exceptions from invokedynamic in a BootstrapMethodError
-
- Resolved
-
-
JDK-8129133 HotSpot fails to wrap Exceptions from invokedynamic in a BootstrapMethodError
-
- Resolved
-
-
JDK-8129657 HotSpot fails to wrap Exceptions from invokedynamic in a BootstrapMethodError
-
- Resolved
-
-
JDK-8137690 HotSpot fails to wrap Exceptions from invokedynamic in a BootstrapMethodError
-
- Resolved
-
- relates to
-
JDK-7049415 Failure of resolution of sym.reference to the c.s.s. should be wrapped in BootstrapMethodError
-
- Resolved
-
-
JDK-8081012 vm/mlvm/cp/stress/classfmt/incorrectBootstrap fails with IllegalAccessError: no such method: Dummy.bootstrapInstance
-
- Resolved
-