-
Bug
-
Resolution: Fixed
-
P2
-
hs23, 6
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2225824 | 8 | Christian Thalinger | P2 | Closed | Fixed | b44 |
JDK-8018259 | 7u45 | Christian Thalinger | P2 | Closed | Fixed | b01 |
JDK-8002571 | 7u40 | Christian Thalinger | P2 | Closed | Fixed | b01 |
JDK-2225507 | 7u6 | Christian Thalinger | P2 | Closed | Fixed | b14 |
JDK-8017365 | 6u65 | Abhijit Saha | P2 | Closed | Fixed | b01 |
JDK-2224999 | 6u60 | Andreas Eriksson | P2 | Closed | Fixed | b01 |
JDK-2224998 | hs23.2 | Christian Thalinger | P2 | Resolved | Fixed | b05 |
http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2012-May/007698.html
The failing test case is:
public class Test {
volatile static private int a;
static private int b;
public static void main(String [] args) throws Exception {
for (int i = 0; i < 100; i++) {
new Thread() {
@Override
public void run() {
int tt = b; // makes the jvm cache the value of b
while (a==0) {
}
if (b == 0) {
System.out.println("error");
}
}
}.start();
}
b = 1;
a = 1;
}
}
To hit the bug run:
$ java -client Test
- backported by
-
JDK-2224998 C1 doesn't respect the JMM with volatile field loads
- Resolved
-
JDK-2224999 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-2225507 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-2225824 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-8002571 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-8002572 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-8017365 C1 doesn't respect the JMM with volatile field loads
- Closed
-
JDK-8018259 C1 doesn't respect the JMM with volatile field loads
- Closed
- duplicates
-
JDK-7170319 Bug in GVN code in C1 breaks Java volatile semantics
- Closed
- relates to
-
JDK-8175887 C1 value numbering handling of Unsafe.get*Volatile is incorrect
- Closed