[concurrency-interest] _interrupted field visibility bug in OpenJDK 7+

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Nov 7 19:35:18 EST 2012

On 11/07/2012 06:27 PM, Aleksey Shipilev wrote:
> On 11/07/2012 06:19 PM, Aleksey Shipilev wrote:
>> On 11/07/2012 05:00 PM, Dr Heinz M. Kabutz wrote:
>>> As I said, the original code was more involved, but this demonstrates
>>> the essentials.  I hope some of you might be able to take a look at
>>> what's going on.
>> Successfully reproduced the failure on JDK 7u7, Linux x86_64:
>>   java version "1.7.0_07"
>>   Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
>>   Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
>> Tests passes with -XX:-Inline. Will look at more detail shortly.
> This seems to be the miscompilation indeed:
> # {method} 'think' '()V' in 'InterruptedVisibilityTest'
>   ...
>   0x00007f31890601a3: mov    0x14(%r10),%r11d      // read $interrupted
>   0x00007f31890601a7: test   %r11d,%r11d           // test $interrupted
>   0x00007f31890601aa: jne    0x00007f31890601c9    // exit branch
>   0x00007f31890601ac: mov    %rbp,%r10             // LOOP START
>   0x00007f31890601af: test   %eax,0xb15ee4b(%rip)  // safepoint
>   0x00007f31890601b5: jmp    0x00007f31890601ac    // LOOP END
> Will raise the appropriate issue against OpenJDK once I finish with a
> quick errand here. Thanks for the test case!

This is submitted as

It would take a while for this bug to appear in public.


More information about the Concurrency-interest mailing list