RFR: 8369631: Assess and remedy any unsafe usage of the sr_semaphore Semaphore in the Posix signal code [v2]
Stefan Karlsson
stefank at openjdk.org
Thu Oct 16 17:52:50 UTC 2025
On Thu, 16 Oct 2025 16:09:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Switch to DeferredStatic per Kim's request
>
> src/hotspot/os/posix/signals_posix.cpp line 173:
>
>> 171: static DeferredStatic<OSXSemaphore> sr_semaphore;
>> 172: #else
>> 173: static DeferredStatic<PosixSemaphore> sr_semaphore;
>
> [pre-existing] Oh, ick. Please remove the indentation for the definitions of sr_semaphore. In the context of this diff I thought these were declarations at class scope, and was quite confused because I couldn't find a definition. Nope, these are at file scope, and *are* definitions. (This might be what is confusing @stefank about how they are/were being constructed.)
Ahh. Thanks for solving that conundrum.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27762#discussion_r2436914930
More information about the hotspot-runtime-dev
mailing list