RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v2]

Alan Bateman alanb at openjdk.org
Thu Jul 27 05:48:42 UTC 2023


On Wed, 26 Jul 2023 21:52:04 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> src/java.base/share/native/libjli/java.c line 464:
>> 
>>> 462:     if (dumpSharedSpaces) {
>>> 463:       CHECK_EXCEPTION_LEAVE(0);
>>> 464:       LEAVE();
>> 
>> What is exit status ($?) when -Xshare:dump fails. It looks like any pending exception will be printed and it will exit with 0 but maybe I've missed something.
>> 
>> In passing, the java launcher uses 4-space indent rather than 2.
>
> I am not incredibly familiar with the java launcher but I believe what I have is a mistake. I will change it to `CHECK_EXCEPTION_LEAVE(1)` instead.

Yes, if you change it CHECK_EXCEPTION_LEAVE(1)then any pending exception will be printed and it will exit with 1; if there is no pending exception then it exit with the value of `ret` as the exit status, which will be 0 here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14879#discussion_r1275758802


More information about the core-libs-dev mailing list