[concurrency-interest] a volatile bug?

Doug Lea dl at cs.oswego.edu
Sat May 19 09:09:26 EDT 2012


On 05/16/12 18:01, Boehm, Hans wrote:
> Would it make sense to expand a test suite with a bunch of memory model tests, e.g.:
>
> no CSE across volatile load
> corresponding test for a volatile store:
> 	r1 = x; v = ...; r2 = x;  use r1   doesn't replace the use of r1 with r2
> Dekker's example
> No fusion of potentially infinite loops
> Maybe IRIW/write atomicity

Back during JDK5 development (for JSR 133 and 166), we did create
some such tests (some of which are available in our test/loops CVS)
but they were never collected or systematized into a  hotspot
JMM test suite. I'm not sure whether there was a test (or an
implicit one in any of our jsr166 tests) that hit this particular
case, but my guess is that this C1 (-client) bug arose after
our initial JDK5 testing. (Nearly all "routine" j.u.c tests use
C2 (-server).)  Hopefully this bug will spur more complete regression
testing.

-Doug



More information about the Concurrency-interest mailing list