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

Bernd Eckenfels ecki at zusammenkunft.net
Fri Jul 29 01:22:50 UTC 2022


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.

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

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/
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
╱ ╲ header encryption!
                        ****************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk8u-dev/attachments/20220729/af46c961/attachment.htm>


More information about the jdk8u-dev mailing list