[jdk8u-dev] RFR: 8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE
David Holmes
david.holmes at oracle.com
Fri Jul 29 12:25:04 UTC 2022
Hi Thorsten,
On 29/07/2022 10:44 am, Thorsten Glaser wrote:
> 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.
JVM_Exit is never called by any Java code so this is dead code that has
been removed. The JVM_* API is not supported for any use other than the
JDK library so no external uses of this symbol should exist.
David
-----
> 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
More information about the jdk8u-dev
mailing list