[concurrency-interest] a volatile bug?

Wolfgang Baltes wolfgang.baltes at laposte.net
Fri Jun 15 11:52:20 EDT 2012


It looks like this has been fixed in the latest JDK 7u6 build b14 See 
the last item in the category "hotspot" on this web page: 
http://download.java.net/jdk7u6/changes/jdk7u6-b14.html.

Wolfgang.

On 2012-05-16 09:55, Zhong Yu wrote:
> as reported on
> http://stackoverflow.com/questions/10620680
>
> basically there are
>
>      volatile int a;
>      int b;
>
> Thread 1:
>
>      b=1;
>      a=1;
>
> Thread 2:
>
>      while(a==0)
>          ;
>      if(b==0)
>          print("error");
>
> "error" is seen printed on 32 bit JDK6 on 64bit machine
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>




More information about the Concurrency-interest mailing list