On Tue, 20 Oct 2026 21:47:16 GMT, Phil Race <[email protected]> wrote:

>> Phil Race has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8393035
>
> src/java.desktop/macosx/native/libosxapp/JNIUtilities.h line 55:
> 
>> 53: 
>> 54: #define GET_CLASS_ONLY(dst_var, cls) \
>> 55:      dispatch_once(&dst_var##_once, ^{ \
> 
> This change from a test for NULL to dispatch_once is the fix. The rest is 
> just to support it.

There seems to be a deviation from previous. code...
If FindClass or NewGlobalRef fails, dst_var = NULL but block returns normally 
so dispatch_once marks initiization complete but on subsequent call, 
dispatch_once skips initialization and CHECK_NULL returns again so it seems 
transient failure can leave the cache unavailable for rest of the process

Previously  the block is done inside if(dst_var == NULL) check so it would have 
again be retried

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33481#discussion_r4490359604

Reply via email to