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

harold seigel harold.seigel at oracle.com
Wed Aug 10 13:08:16 UTC 2016


Hi,

Please review these updated webrevs to fix bug JDK-8058575.

    http://cr.openjdk.java.net/~hseigel/bug_8058575.hs.2/

    http://cr.openjdk.java.net/~hseigel/bug_8058575.jdk.2/

The revised changes were tested as described below.

Thanks, Harold



-------- Forwarded Message --------
Subject: 	RFR 8058575: IllegalAccessError trying to access 
package-private class from VM anonymous class
Date: 	Wed, 3 Aug 2016 08:15:58 -0400
From: 	harold seigel <harold.seigel at oracle.com>
Organization: 	Oracle Corporation
To: 	Hotspot dev runtime <hotspot-runtime-dev at openjdk.java.net>



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