EVALUATION
Christian Thalinger writes:
The fix is actually very simple:
diff --git a/src/share/vm/c1/c1_ValueMap.hpp b/src/share/vm/c1/c1_ValueMap.hpp
--- a/src/share/vm/c1/c1_ValueMap.hpp
+++ b/src/share/vm/c1/c1_ValueMap.hpp
@@ -160,8 +160,8 @@
void do_Local (Local* x) { /* nothing to do */ }
void do_Constant (Constant* x) { /* nothing to do */ }
void do_LoadField (LoadField* x) {
- if (x->is_init_point()) {
- // getstatic is an initialization point so treat it as a wide kill
+ if (x->is_init_point() || // getstatic is an initialization point so treat it as a wide kill
+ x->field()->is_volatile()) { // The JMM requires this.
kill_memory();
}
}
This kills all loads after the volatile load.
|