>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
My students and I checked a number of platforms. Sun's 1.4 VM's
appear to be fully compliant. Other than that, the situation is
fairly sad. 1.3.1 Hotspot server is fairly close; the only problems
seems to be lack of a memory barrier between a volatile write and a
following volatile read (we also found a number of other bugs in
1.3.1, including a VM crash and an illegal compiler transformation of
IBM's 1.3.1 VM's are not not generating the required memory barrier.
From what Peter Hagger said, IBM has not yet done any work on fixing
it, so IBM's 1.4 VM's will probably not be compliant either (somehow,
adding the volatile tests to the 1.4 TCK slipped through the cracks).
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