-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b120
For Jigsaw and other reasons, the implementation of Unsafe.defineAnonymousClass() is changing in JDK-9 to require that the anonymous class either be in its host's package or not in any package (in which case the JVM will put it in its host's package). Otherwise, defineAnonymousClass() will throw IllegalArgumentException.
Class java.lang.invokeMethodHandleImpl currently uses the name java/lang/invoke/MethodHandleImpl$BindCaller$T for its anonymous class. This should be changed to use an anonymous class with either no package name or the package name of its host class. Otherwise, multiple jtreg and nsk tests will fail once the changes to Unsafe.defineAnonymousClass() are checked into JDK-9. Some of the failing tests are:
hotspot/closed/compiler/c2/8004336/Test8004336.java
hotspot/closed/compiler/jsr292/8009699/Test8009699B.java
jdk/test/java/closed/java/lang/invoke/7197546/MethodHandleProxiesTest.java
jdk/test/java/lang/StackWalker/GetCallerClassTest.java
...
also many of the UTE vm/runtime/defmeth/scenarios/... tests
Class java.lang.invokeMethodHandleImpl currently uses the name java/lang/invoke/MethodHandleImpl$BindCaller$T for its anonymous class. This should be changed to use an anonymous class with either no package name or the package name of its host class. Otherwise, multiple jtreg and nsk tests will fail once the changes to Unsafe.defineAnonymousClass() are checked into JDK-9. Some of the failing tests are:
hotspot/closed/compiler/c2/8004336/Test8004336.java
hotspot/closed/compiler/jsr292/8009699/Test8009699B.java
jdk/test/java/closed/java/lang/invoke/7197546/MethodHandleProxiesTest.java
jdk/test/java/lang/StackWalker/GetCallerClassTest.java
...
also many of the UTE vm/runtime/defmeth/scenarios/... tests
- blocks
-
JDK-8133719 java.lang.InternalError in java.lang.invoke.MethodHandleImpl$BindCaller.bindCaller
-
- Resolved
-
- relates to
-
JDK-8058575 IllegalAccessError trying to access package-private class from VM anonymous class
-
- Resolved
-
-
JDK-8157464 Disallow StackWalker.getCallerClass() be called by caller-sensitive method
-
- Closed
-