RFR: 8367475: Incorrect lock usage in LambdaFormInvokers::regenerate_holder_classes
David Holmes
dholmes at openjdk.org
Fri Sep 12 03:54:19 UTC 2025
On Fri, 12 Sep 2025 03:22:56 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> src/hotspot/share/cds/cdsConfig.cpp line 870:
>>
>>> 868: bool CDSConfig::current_thread_is_dumper() {
>>> 869: Thread* t = Thread::current();
>>> 870: return t != nullptr && t == _dumper_thread;
>>
>> Do you really need the null check here? How could an unattached thread be executing this?
>
> I am not sure, but it surely doesn't hurt. I want to make sure that if this is called when `_dumper_thread` is not initialized, we will return `false` for any thread.
It gives the impression that null is possible somehow. But it will assert if that happens - which I doubt is possible.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27231#discussion_r2342874535
More information about the hotspot-runtime-dev
mailing list