--- old/src/share/vm/c1/c1_ValueMap.hpp 2017-02-27 14:55:49.647175333 +0100 +++ new/src/share/vm/c1/c1_ValueMap.hpp 2017-02-27 14:55:49.543175807 +0100 @@ -157,6 +157,16 @@ void do_UnsafePutRaw (UnsafePutRaw* x) { kill_memory(); } void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); } void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); } + void do_UnsafeGetRaw (UnsafeGetRaw* x) { + // This is actually too strict for some cases. But better be safe than sorry + // when dealing with raw memory accesses. + kill_memory(); + } + void do_UnsafeGetObject(UnsafeGetObject* x) { + if (x->is_volatile()) { // the JMM requires this + kill_memory(); + } + } void do_Intrinsic (Intrinsic* x) { if (!x->preserves_state()) kill_memory(); } void do_Phi (Phi* x) { /* nothing to do */ } @@ -197,8 +207,6 @@ void do_OsrEntry (OsrEntry* x) { /* nothing to do */ } 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_ProfileCall (ProfileCall* x) { /* nothing to do */ } void do_ProfileReturnType (ProfileReturnType* x) { /* nothing to do */ } void do_ProfileInvoke (ProfileInvoke* x) { /* nothing to do */ };