hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp
changeset 38657 3caf062361a6
parent 38035 a6105022c551
child 42650 1f304d0c888b
--- a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Tue May 10 00:17:46 2016 -0700
+++ b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp	Mon May 09 23:49:22 2016 -0700
@@ -92,9 +92,11 @@
 #ifndef PRODUCT
   NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
 
-  assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(),
+  // read the value once
+  volatile intptr_t data = method_holder->data();
+  assert(data == 0 || data == (intptr_t)callee(),
          "a) MT-unsafe modification of inline cache");
-  assert(method_holder->data() == 0 || jump->jump_destination() == entry,
+  assert(data == 0 || jump->jump_destination() == entry,
          "b) MT-unsafe modification of inline cache");
 #endif
   // Update stub.