Review Request JDK-8181443: Replace usages of jdk.internal.misc.Unsafe with MethodHandles.Lookup.defineClass

Mandy Chung mandy.chung at oracle.com
Wed Oct 3 17:56:51 UTC 2018


This patch replaces java.lang.invoke and JFR use of
jdk.internal.misc.Unsafe::defineClass with Lookup::defineClass.
It also replaces dynamic proxy and reflection implementation to
use the shared secret to invoke ClassLoader::defineClass.

Webrev:
http://cr.openjdk.java.net/~mchung/jdk12/webrevs/8181443/webrev.00

With this change, JDK no longer uses Unsafe::defineClass.
Any opinion in removing Unsafe::defineClass support?

I ran jdk_core, jdk_jfr, tier1_runtime and tier1_compiler tests.

thanks
Mandy





More information about the core-libs-dev mailing list