Case 9 is stated as:
==============================================
<H2>Causality test case 9</H2><PRE>Initially, x = y = 0
Thread 1:
r1 = x
r2 = 1 + r1*r1 - r1
y = r1
Thread 2:
r3 = y
x = r3
Thread 3:
x = 2
Behavior in question: r1 = r2 = 1
Decision: Allowed. Similar to test case 8, except that the x is not always
0 or 1. However, a compiler might determine that the read of x by thread
2 will never see the write by thread 3 (perhaps because thread 3
will be scheduled after thread 1). Thus, the compiler
can determine that r1 will always be 0 or 1.
</PRE>
<HR>
================================================
I propose this test be changed so that Line 3 in Thread 1 is y=r2.
Nothing else is changed.
If this was not a typo, and this test is intended as it is, then I
propose the decision be changed to forbidden. This is the same as Test
4, with some irrelevant stuff. Definitely not similar to Test 8!
Similar remark applies to Test 9a.
Best,
Vijay
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:58 EDT