<AWT Dev> [9] Review Request: 8166673 The new implementation of Robot.waitForIdle() may hang

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Tue Oct 11 13:36:13 UTC 2016


+1

--
Thanks,
Alexander.

On 07.10.2016 17:07, Sergey Bylokhov wrote:
> On 07.10.16 10:28, Semyon Sadetsky wrote:
>> Hi Sergey,
>>
>> 1525         queueEmpty = false;
>> 1526         eventDispatched = false;
>> 1527         synchronized(waitLock) {
>>
>> Shouldn't lines 1525 & 1526 be moved inside the synchronized block?
>
> I think so, at least this will unify how we use these in dispatch 
> event and at the end of waitForIdle():
> http://cr.openjdk.java.net/~serb/8166673/webrev.01
>
>> On 9/26/2016 8:38 PM, Sergey Bylokhov wrote:
>>> Hello.
>>>
>>> Please review the fix for jdk9.
>>>
>>> The SunToolkit.waitForIdle() uses string literal for synchronization,
>>> which means some code (intentionally or not) can hang 
>>> Robot.waitForIdle.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8166673
>>> Webrev can be found at:
>>> http://cr.openjdk.java.net/~serb/8166673/webrev.00
>>>
>>
>
>



More information about the awt-dev mailing list