-
Bug
-
Resolution: Fixed
-
P2
-
9, 10
-
b161
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8176947 | 10 | Aleksey Shipilev | P2 | Resolved | Fixed | b03 |
JDK-8183663 | 8u161 | Aleksey Shipilev | P2 | Resolved | Fixed | b01 |
JDK-8176451 | 8u152 | Aleksey Shipilev | P2 | Closed | Fixed | b02 |
JDK-8192225 | emb-8u161 | Aleksey Shipilev | P2 | Resolved | Fixed | b01 |
This looks eerily similar to JDK-7170145, but now for Unsafe.get*Volatile handling in C1. We seem to miss the case for volatile ops like this:
$ hg diff src/share/vm/c1/c1_ValueMap.hpp
diff -r dedf248e8e3e src/share/vm/c1/c1_ValueMap.hpp
--- a/src/share/vm/c1/c1_ValueMap.hpp Mon Feb 13 10:37:33 2017 -0500
+++ b/src/share/vm/c1/c1_ValueMap.hpp Mon Feb 27 10:33:01 2017 +0100
@@ -198,7 +198,11 @@
void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }
void do_RoundFP (RoundFP* x) { /* nothing to do */ }
void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ }
- void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }
+ void do_UnsafeGetObject(UnsafeGetObject* x) {
+ if (x->is_volatile()) {
+ kill_memory();
+ }
+ }
void do_ProfileCall (ProfileCall* x) { /* nothing to do */ }
void do_ProfileReturnType (ProfileReturnType* x) { /* nothing to do */ }
void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ };
This might explain a few failures in jcstress, like this -- although not confirmed as the actual culprit:
http://openjdk.linaro.org/jdk9/jcstress-nightly-runs/2017/056/results/org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest.html
$ hg diff src/share/vm/c1/c1_ValueMap.hpp
diff -r dedf248e8e3e src/share/vm/c1/c1_ValueMap.hpp
--- a/src/share/vm/c1/c1_ValueMap.hpp Mon Feb 13 10:37:33 2017 -0500
+++ b/src/share/vm/c1/c1_ValueMap.hpp Mon Feb 27 10:33:01 2017 +0100
@@ -198,7 +198,11 @@
void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }
void do_RoundFP (RoundFP* x) { /* nothing to do */ }
void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ }
- void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }
+ void do_UnsafeGetObject(UnsafeGetObject* x) {
+ if (x->is_volatile()) {
+ kill_memory();
+ }
+ }
void do_ProfileCall (ProfileCall* x) { /* nothing to do */ }
void do_ProfileReturnType (ProfileReturnType* x) { /* nothing to do */ }
void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ };
This might explain a few failures in jcstress, like this -- although not confirmed as the actual culprit:
http://openjdk.linaro.org/jdk9/jcstress-nightly-runs/2017/056/results/org.openjdk.jcstress.tests.coherence.varHandles.fields.opaque.ShortTest.html
- backported by
-
JDK-8176947 C1 value numbering handling of Unsafe.get*Volatile is incorrect
-
- Resolved
-
-
JDK-8183663 C1 value numbering handling of Unsafe.get*Volatile is incorrect
-
- Resolved
-
-
JDK-8192225 C1 value numbering handling of Unsafe.get*Volatile is incorrect
-
- Resolved
-
-
JDK-8176451 C1 value numbering handling of Unsafe.get*Volatile is incorrect
-
- Closed
-
- relates to
-
JDK-7170145 C1 doesn't respect the JMM with volatile field loads
-
- Closed
-