RFR: 8202631: JVM_Clone to throw CloneNotSupportException for Reference object
David Holmes
david.holmes at oracle.com
Tue May 8 02:27:17 UTC 2018
Looks good!
Hadn't realized we had so much supporting code for this!
Thanks,
David
On 8/05/2018 11:02 AM, Kim Barrett wrote:
> 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