On Fri, 11 Feb 2022 23:28:43 GMT, Phil Race <p...@openjdk.org> wrote:

>> This test has started failing since we got M1 macs to test on. I don't think 
>> we've ever seen this failure elsewhere.
>> I don't know what it is about that architecture that makes it more likely 
>> but I can see how it can happen when multiple threads are using the same 
>> instance. 
>> 
>>                     if (newFramePosition >= 0) { 
>>                         clipBytePosition = newFramePosition * frameSize; 
>>                         newFramePosition = -1; 
>>                     } 
>> 
>> newFramePosition is declared volatile which does make it quite possible that 
>> after the read and before the use it will have changed.
>> 
>> The fix just synchronizes this block to prevent it.
>
> Phil Race has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with 
> ArrayIndexOutOfBoundsException: Array index out of range: -4

Marked as reviewed by serb (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/7436

Reply via email to