RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

harold seigel harold.seigel at oracle.com
Fri Sep 2 13:02:08 UTC 2016


Please review this new fix for JDK-8058575.  This fix requires that a VM 
anonymous class be in either the same package as its host class or be in 
the unnamed package.  If the anonymous class is in the unnamed package 
then this fix puts it into its host class's package, ensuring that the 
anonymous class and its host class are in the same module.  This fix 
also throws an IllegalArgumentException if the host class is an array 

Additionally, the type of field ClassFileParser::_host_klass was changed 
to InstanceKlass* and some comments were cleaned up.

JBS bug: https://bugs.openjdk.java.net/browse/JDK-8058575

Open webrevs:



The fix was tested with the JCK API, Lang and VM tests, the hotpot, and 
java/lang, java/util and other JTreg tests, the RBT tier2 tests, and the 
NSK colocated tests and non-colocated quick tests.

Thanks, Harold

More information about the hotspot-runtime-dev mailing list