diff src/share/vm/code/compiledIC.cpp @ 13441:df832bd8edb9

8028107: Kitchensink crashed with EAV Summary: check the state of caller and callee nmethods and skip call site patching if any of them is not alive Reviewed-by: jrose, twisti
author kvn
date Fri, 06 Dec 2013 12:11:51 -0800
parents 891687731b59
children 02f27ecb4f3a 78bbf4d43a14
line wrap: on
line diff
--- a/src/share/vm/code/compiledIC.cpp	Fri Dec 06 09:41:57 2013 -0800
+++ b/src/share/vm/code/compiledIC.cpp	Fri Dec 06 12:11:51 2013 -0800
@@ -418,7 +418,7 @@
                                            TRAPS) {
   nmethod* method_code = method->code();
   address entry = NULL;
-  if (method_code != NULL) {
+  if (method_code != NULL && method_code->is_in_use()) {
     // Call to compiled code
     if (static_bound || is_optimized) {
       entry      = method_code->verified_entry_point();
@@ -545,7 +545,7 @@
 void CompiledStaticCall::compute_entry(methodHandle m, StaticCallInfo& info) {
   nmethod* m_code = m->code();
   info._callee = m;
-  if (m_code != NULL) {
+  if (m_code != NULL && m_code->is_in_use()) {
     info._to_interpreter = false;
     info._entry  = m_code->verified_entry_point();
   } else {