RFR: 8303624: The java.lang.Thread.FieldHolder can be null for JNI attaching threads [v3]
David Holmes
dholmes at openjdk.org
Thu Mar 9 07:51:09 UTC 2023
On Thu, 9 Mar 2023 07:23:50 GMT, John R Rose <jrose at openjdk.org> wrote:
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update comment per @alanb
>
> Yes, that looks reasonable. The macro regularizes the necessary careful treatment of the extra indirection. I see how a previous one-off attempt probably left holes, which this systematic treatment would fill.
>
> Changing CHECK to THREAD is tolerable, since not much happens afterwards, just a statement or two. Maybe add a comment saying what could fail, and why that extra logic is still OK to run even if the failure happens.
Thanks for taking a look at this @rose00 .
> Changing CHECK to THREAD is tolerable, since not much happens afterwards, just a statement or two. Maybe add a comment saying what could fail, and why that extra logic is still OK to run even if the failure happens.
I've changed THREAD to CHECK so that we will skip the following statements. The call to `java_lang_Thread::set_daemon(thread_oop())` could assert due to the null FieldHolder.
-------------
PR: https://git.openjdk.org/jdk/pull/12892
More information about the hotspot-runtime-dev
mailing list