Mercurial > hg > truffle
diff src/share/vm/code/nmethod.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 | 78da3894b86f |
children | 02f27ecb4f3a 3aaa4b9966f6 606acabe7b5c 5da8bb64b370 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Fri Dec 06 09:41:57 2013 -0800 +++ b/src/share/vm/code/nmethod.cpp Fri Dec 06 12:11:51 2013 -0800 @@ -459,7 +459,7 @@ // Fill in default values for various flag fields void nmethod::init_defaults() { - _state = alive; + _state = in_use; _marked_for_reclamation = 0; _has_flushed_dependencies = 0; _has_unsafe_access = 0; @@ -1660,8 +1660,8 @@ CompiledICHolder* cichk_oop = ic->cached_icholder(); if (cichk_oop->holder_method()->method_holder()->is_loader_alive(is_alive) && cichk_oop->holder_klass()->is_loader_alive(is_alive)) { - continue; - } + continue; + } } else { Metadata* ic_oop = ic->cached_metadata(); if (ic_oop != NULL) { @@ -1677,8 +1677,8 @@ ShouldNotReachHere(); } } - } - ic->set_to_clean(); + } + ic->set_to_clean(); } } } @@ -2393,8 +2393,8 @@ void nmethod::verify_interrupt_point(address call_site) { // Verify IC only when nmethod installation is finished. - bool is_installed = (method()->code() == this) // nmethod is in state 'alive' and installed - || !this->is_in_use(); // nmethod is installed, but not in 'alive' state + bool is_installed = (method()->code() == this) // nmethod is in state 'in_use' and installed + || !this->is_in_use(); // nmethod is installed, but not in 'in_use' state if (is_installed) { Thread *cur = Thread::current(); if (CompiledIC_lock->owner() == cur ||