[OpenJDK 2D-Dev] RFR: 8145808: [PIT] test java/awt/Graphics2D/MTGraphicsAccessTest

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu Dec 24 15:59:31 UTC 2015


On 24/12/15 04:22, Jim Graham wrote:
> Looks good.

+1

>
> You're correct that volatile isn't enough to protect the case where 2
> threads finish their work at exactly the same time.  They would need a
> synchronized block around the decrements (the increments are executed in
> the constructor by the main thread so they aren't contended, but it
> couldn't hurt to have all of the counts be atomic)...
>
>              ...jim
>
> On 12/23/2015 1:55 PM, Phil Race wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8145808
>> http://cr.openjdk.java.net/~prr/8145808/
>>
>> I believe we have a test bug where the decrement on the
>> counter is being treated as atomic but it is carried out on
>> different threads protected only by 'volatile'.
>>
>> This fix does seem likely to make the test more reliable.
>> Note that "numexceptions" technically has the same issue
>> but it does not matter as it is mainly informational but
>> and any number > 0 is all that ever matters.
>> So I left that alone.
>>
>> -phil.


-- 
Best regards, Sergey.



More information about the 2d-dev mailing list