RFR: 8202631: JVM_Clone to throw CloneNotSupportException for Reference object
Kim Barrett
kim.barrett at oracle.com
Tue May 8 01:02:01 UTC 2018
Please review this change to JVM_Clone to throw
CloneNotSupportedException for instances of java.lang.ref.Reference.
Per JDK-8201793, Reference and classes derived from it should not
support copying via Object.clone. This is a belt-and-suspenders
augmentation of that change.
This change also reverts most of the earlier attempt to support
cloning references. The check for Reference in Klass::set_is_cloneable
to prevent setting its JVM_ACC_IS_CLONEABLE_FAST flag has been retained,
to further ensure a call can't be intrinsified.
This change also removes sun_misc_Cleaner_signature; see JDK-8194804.
CRs:
https://bugs.openjdk.java.net/browse/JDK-8202631
https://bugs.openjdk.java.net/browse/JDK-8194804
Webrev:
http://cr.openjdk.java.net/~kbarrett/8202631/open.00/
Testing:
{jdk,hs}-tier{1,2,3} on all Oracle-supported platforms.
Manually executed test from JDK-8201793, with and without that change.
More information about the hotspot-dev
mailing list