On Wed, 27 May 2026 19:17:41 GMT, Phil Race <[email protected]> wrote:
>> EQ is not final, so the user may have its own EQ. it should be possible to
>> break it by this order:
>>
>> Suntoolkit->contructor->initEQ()->
>> if (currentEventQueue == null) {
>> currentEventQueue = new EventQueue();
>> <--sleep here-->
>> postEventQueue = new PostEventQueue(currentEventQueue);
>> }
>>
>> then:
>>
>> EventQueue->push()->
>> if (SunToolkit.currentEventQueue == topQueue) {
>> SunToolkit.currentEventQueue = newEventQueue;
>> }
>>
>> then
>>
>> Suntoolkit->contructor->initEQ()->
>> <--wakeup here-->
>> postEventQueue = new PostEventQueue(currentEventQueue);
>> }
>
> So you are (as I asked above) suggesting synchronizing that block in push() ?
> It never has been synchronized before.
I think that before
[8384381](https://github.com/openjdk/jdk/commit/9be6e77d7346b732acfc5b604fdf046273a4e623#diff-6e0df721ca0d7af46fa0e7c13ae47c5d031eaf0e2514c74fbd0407e3a4921f79L234),
the appContext was always created before any EventQueue was created, so this
issue did not exist, and now it is here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31262#discussion_r3313418430