JavaMemoryModel: Current compliance with volatile?

From: Bill Pugh (pugh@cs.umd.edu)
Date: Wed Mar 27 2002 - 12:51:30 EST


At his JavaOne talk, Peter Hagger claimed that most Java VM's still
do not implement volatile correctly. I am rather dubious; I
believe/hope most are compliant. As far as I know, Hotspot is
compliant (both server and client versions).

Can anyone provide current information on other platforms/VMs? The
tests are available from http://www.cs.umd.edu/~pugh/java/memoryModel

   AtomicLong.java - Tests for atomic read/writes of volatile Longs
   CoherenceVolatile.java - Tests for illegal compiler optimizations
involving volatiles
   ReadAfterWrite.java - Tests for sequential consistency of volatiles

I would like to have accurate information to disseminate at our
JavaOne talk Thursday afternoon, so I would really appreciate it if
people could check these tests against various VM's (or if VM
implementors could tell us whether or not they have handled them).

Thanks,
        Bill Pugh
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:39 EDT