Integrated: 8340420: ZGC: Should call `vm_shutdown_during_initialization` if initialization fails
Axel Boldt-Christmas
aboldtch at openjdk.org
Tue Oct 1 11:35:41 UTC 2024
On Mon, 30 Sep 2024 06:36:21 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> ZGC does not call `vm_shutdown_during_initialization` if initialization fails during the setup of the CollectedHeap, in contrast to the other GC.
>
> I propose we add a `ZInitialize::error` which we can use during initialisation to record errors. The first error recored is also stored and used as the error message when shutting down the VM.
>
> Initially used malloc to allocate the error (ed9ba5dd6805291a6b1b56566c933424230d3b4a) but feels like it is just better to have static storage for the string and not have to care about malloc potentially failing to allocate.
This pull request has now been integrated.
Changeset: f7c7958f
Author: Axel Boldt-Christmas <aboldtch at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f7c7958f001b3242eb485efd25bbcf9e1be75d85
Stats: 119 lines in 9 files changed: 92 ins; 2 del; 25 mod
8340420: ZGC: Should call `vm_shutdown_during_initialization` if initialization fails
Reviewed-by: stefank, mli
-------------
PR: https://git.openjdk.org/jdk/pull/21254
More information about the hotspot-dev
mailing list