RFR: 8308764: Reporting errors from create_vm may crash [v5]
Coleen Phillimore
coleenp at openjdk.org
Tue Jun 6 13:49:57 UTC 2023
On Tue, 6 Jun 2023 08:13:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> There are more details in the bug report but the basic fix is to not delete the main_thread so that it is available to report the exception that caused VM initialization to fail. Added some additional comments too.
>>
>> Testing:
>> - basic fault injection to test non-exception exit paths both before and after Universe:;is_fully_initialized() which exercises the failing use of JavaThread::current()
>> - tiers 1-3 sanity testing
>>
>> Thanks.
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix comment typo
src/hotspot/share/runtime/threads.cpp line 572:
> 570: if (!main_thread->has_pending_exception()) {
> 571: main_thread->smr_delete();
> 572: }
I'm sorry for belaboring this change but since jni is the only caller of this and conditionally calls vm_exit_during_initialization() with the pending exception, why not just do it here and take out the code in jni? I was confused for a while about the thread being null in the jni caller.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14238#discussion_r1219686588
More information about the hotspot-runtime-dev
mailing list