Seeing error in one test on ARM: org.openjdk.jcstress.tests.volatiles.ReadTwiceOverVolatileReadTest
Aleksey Shipilev
shade at redhat.com
Thu Feb 23 14:35:57 UTC 2017
On 02/23/2017 03:32 PM, White, Derek wrote:
> I want to nail down the nearly obvious, because the next level get tricky to
> me real fast.
>
> The result (1, 0, 0) n this test means that actor2() read and stored x as 1,
> read and stored y as 0 (so far, so good), and read and stored X as 0. Is this
> correct?
Yes. And JMM actually allows this result for plain memory ops, hence the test
grading fix. But it is suspicious to see this behavior on the actual hardware,
because hardware is supposed to exhibit "coherency": a single modification order
for a particular memory location. Reading x:1, and then x:0 is the evidence of
coherency violation. See JMMSample_03 for more discussion.
Thanks,
-Aleksey
More information about the jcstress-dev
mailing list