[concurrency-interest] a volatile bug?
nathan.reynolds at oracle.com
Wed May 16 15:17:36 EDT 2012
Consider dumping the assembly code.
http://classparser.blogspot.com/2010/03/hsdis-i386dll.html The assembly
code should show a store (i.e. mov) to b before a in Thread 1. It
should also show that b is loaded (i.e. mov) after a in Thread 2. The
assembly code output will probably help get the bug fixed sooner. It
will also show us what exactly went wrong when the bytecode was
optimized into machine code.
Consulting Member of Technical Staff | 602.333.9091
Oracle PSR Engineering <http://psr.us.oracle.com/> | Server Technology
On 5/16/2012 12:00 PM, Aleksey Shipilev wrote:
> On Wed, May 16, 2012 at 10:40 PM, Boehm, Hans<hans.boehm at hp.com> wrote:
>> A JDK bug AND a serious test suite omission?
> Stress tests would probably JIT-compile the code in question. See below.
>> But is the problem real? Can it be reproduced on a mainstream JVM?
> Same question.
>> Note that the example in the original posting also read b before the loop,
>> so naïve common subexpression elimination would cause the bug. Hopefully
>> nobody does CSE in cases like this.
> FWIW, the test case in SO would probably not hit any compilation
> threshold in HotSpot, so it could be executed in interpreter. Then,
> assuming the interpreter does not reorder Java code, and assuming
> original SO poster runs Windows, and hence x86, and hence has TSO,
> this bug seems very unlikely. I would be surprised if it actually
> *can* be reproduced. That makes the whole story rather interesting.
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest