src/hotspot/cpu/x86/compiledIC_x86.cpp
changeset 54839 e9db10a375d9
parent 52384 d6dc479bcdd3
child 58505 c16f3a24a6fc
--- a/src/hotspot/cpu/x86/compiledIC_x86.cpp	Tue May 14 12:00:49 2019 +0200
+++ b/src/hotspot/cpu/x86/compiledIC_x86.cpp	Tue May 14 12:07:24 2019 +0200
@@ -159,10 +159,10 @@
   NativeJump*        jump          = nativeJump_at(method_holder->next_instruction_address());
 
 #ifdef ASSERT
-  // read the value once
-  volatile intptr_t data = method_holder->data();
-  volatile address destination = jump->jump_destination();
-  assert(data == 0 || data == (intptr_t)callee(),
+  Method* old_method = reinterpret_cast<Method*>(method_holder->data());
+  address destination = jump->jump_destination();
+  assert(old_method == NULL || old_method == callee() ||
+         !old_method->method_holder()->is_loader_alive(),
          "a) MT-unsafe modification of inline cache");
   assert(destination == (address)-1 || destination == entry,
          "b) MT-unsafe modification of inline cache");