RFR: 8360164: AOT cache creation crashes in ~ThreadTotalCPUTimeClosure() [v3]

David Holmes dholmes at openjdk.org
Mon Jun 30 06:33:38 UTC 2025


On Fri, 27 Jun 2025 16:37:29 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> I am not sure what happens when some of that Java code calls System.exit(), or whether such a scenario has been (sufficiently) tested.

Initialization Java code should not be calling System.exit - ever. If something goes wrong it should throw an exception which is seen by the main thread doing the VM init and that in turn will lead to `vm_exit_during_initialization`.

To me the simplest model to use here would be to act as-if AOT creation was done by a small Java class such that you know the VM is fully initialized when you create the cache and then you can do a normal Java-level termination afterwards.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26008#discussion_r2174322202


More information about the hotspot-runtime-dev mailing list