[jdk8u-dev] RFR: 8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE

David Holmes david.holmes at oracle.com
Fri Jul 29 12:27:15 UTC 2022


On 29/07/2022 11:22 am, Bernd Eckenfels wrote:
> Agreed, In addition to that, I also think (as already mentioned, sorry
> ,) the runFinalizerOnExit() should be a NOP or allow a system property 
> to turn it into a nop.

This change has already been proposed and accepted by the JCP as part of 
SE 8 Maintenance Release 4:

https://jcp.org/en/jsr/detail?id=337

Regards,
David
-----

> The risk of code (yeah I know you did not find any) calling that setter 
> (and not liking the exception for example in startup thread) is real, 
> there is no reason to add more incompatibility risk to 8u. Just remove 
> it for new releases.
> 
> Making this a Nop is perfectly within its original spec. (And less code 
> than the throw)
> 
> (Mood: I just spent two days in Code I never wanted to touch again for 
> fixing the issues from a 11u backport, before I could ship the eagerly 
> july security update. It would be worse with the 8 generation systems. I 
> hope this is not a theme for the MR?)
> 
> Gruss
> Bernd
> -- 
> http://bernd.eckenfels.net
> ------------------------------------------------------------------------
> *Von:* jdk8u-dev <jdk8u-dev-retn at openjdk.org> im Auftrag von Thorsten 
> Glaser <t.glaser at tarent.de>
> *Gesendet:* Friday, July 29, 2022 2:44:19 AM
> *An:* David Holmes <dholmes at openjdk.org>
> *Cc:* jdk8u-dev at openjdk.org <jdk8u-dev at openjdk.org>
> *Betreff:* Re: [jdk8u-dev] RFR: 8287132: Retire 
> Runtime.runFinalizersOnExit so that it always throws UOE
> On Fri, 29 Jul 2022, David Holmes wrote:
> 
>>   Patch: https://git.openjdk.org/jdk8u-dev/pull/92.diff 
> <https://git.openjdk.org/jdk8u-dev/pull/92.diff>
> 
>  From a distro maintainer PoV I do have a complaint about this.
> 
> Currently, JVM_Exit is an exported symbol of the shlib:
> 
> $ nm -D 
> /usr/lib/jvm/java-1.8.0-openjdk-i386/jre/lib/i386/server/libjvm.so | 
> fgrep Exit
> 005cc5c0 T JVM_Exit
> […]
> 
> This patch will remove that, IIUC. This is an ABI break.
> 
> ABI breaks need the shlib major version to increase.
> This shlib is unversioned, so this cannot be done.
> 
> Therefore this cannot be done in OpenJDK 8 at all, or in any
> released version really.
> 
> To make this possible, add a dummy JVM_Exit() call, instead of
> removing it altogether. Perhaps like this?
> 
> JVM_ENTRY_NO_ENV(void, JVM_Exit(jint code))
>    before_exit(thread);
>    vm_exit(code);
> JVM_END
> 
> I understand this is the same as JVM_Halt(), but this duplication
> is necessary, mandatory even to avoid breaking existing applications.
> 
> bye,
> //mirabilos
> -- 
> Infrastrukturexperte • tarent solutions GmbH
> Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/ 
> <http://www.tarent.de/>
> Telephon +49 228 54881-393 • Fax: +49 228 54881-235
> HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
> Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander 
> Steeg
> 
>                          
> ****************************************************
> /⁀\ The UTF-8 Ribbon
> ╲ ╱ Campaign against      Mit dem tarent-Newsletter nichts mehr verpassen:
>   ╳  HTML eMail! Also, https://www.tarent.de/newsletter 
> <https://www.tarent.de/newsletter>
> ╱ ╲ header encryption!
>                          
> ****************************************************


More information about the jdk8u-dev mailing list