RFR: 8369250: Assess and remedy any unsafe usage of the Semaphore used by NonJavaThread::List

David Holmes dholmes at openjdk.org
Tue Oct 7 07:15:51 UTC 2025


On Tue, 7 Oct 2025 07:11:42 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Yes, we need a complete class definition of `T` available when we declare the `DeferredStatic<T>`.
>
> But we could instead have in the header
> 
> void non_java_threads_list_init();
> 
> and in the .cpp file
> 
> void non_java_threads_list_init() { NonJavaThread::init(); }
> 
> which is an idiom we frequently use elsewhere.

IIUC given the declaration:'

static DeferredStatic<List> _the_list;

the compiler must be able to see that `List` has an `initialize` method.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27664#discussion_r2409625585


More information about the hotspot-runtime-dev mailing list