RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class
harold seigel
harold.seigel at oracle.com
Wed Aug 3 12:15:58 UTC 2016
Hi,
Please review this fix for bug 8058575. The fix prevents a class
created using Unsafe.defineAnonymousClass() from being in a different
package than its host class. Being in different packages would create
access problems if the packages were in different modules.
With this fix, If the anonymous class is in a different package then the
JVM will throw IllegalArgumentException. If the anonymous class is in
the unnamed package then the JVM will move the anonymous class into its
host class's package.
JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8058575
Open webrevs:
http://cr.openjdk.java.net/~hseigel/bug_8058575.hs/
http://cr.openjdk.java.net/~hseigel/bug_8058575.jdk/
The fix was tested with the JCK Lang and VM tests, the hotpot, and
java/lang, java/util and other JTreg tests, the NSK quick tests, and
with the RBT runtime nightly tests.
Thanks, Harold
More information about the hotspot-runtime-dev
mailing list