< prev index next >
src/share/vm/runtime/frame.cpp
Print this page
*** 237,246 ****
--- 237,259 ----
}
return NULL;
}
+ bool frame::is_entry_frame_valid(JavaThread* thread) const {
+ // Validate the JavaCallWrapper an entry frame must have
+ address jcw = (address)entry_frame_call_wrapper();
+ bool jcw_safe = (jcw < thread->stack_base()) && (jcw > (address)fp()); // less than stack base
+ if (!jcw_safe) {
+ return false;
+ }
+
+ // Validate sp saved in the java frame anchor
+ JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
+ return (jfa->last_Java_sp() > sp());
+ }
+
bool frame::should_be_deoptimized() const {
if (_deopt_state == is_deoptimized ||
!is_compiled_frame() ) return false;
assert(_cb != NULL && _cb->is_nmethod(), "must be an nmethod");
nmethod* nm = (nmethod *)_cb;
< prev index next >