src/cpu/x86/vm/frame_x86.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs24 Cdiff src/cpu/x86/vm/frame_x86.cpp

src/cpu/x86/vm/frame_x86.cpp

Print this page
rev 4213 : 8008340: [sampling] assert(upper->pc_offset() >= pc_offset) failed: sanity
Reviewed-by: duke

*** 95,127 **** // ok. adapter blobs never have a frame complete and are never ok. // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) { - //assert(0, "Invalid frame_size"); return false; } if (!_cb->is_frame_complete_at(_pc)) { if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) { return false; } } // Entry frame checks if (is_entry_frame()) { // an entry frame must have a valid fp. if (!fp_safe) return false; - // Validate the JavaCallWrapper an entry frame must have address jcw = (address)entry_frame_call_wrapper(); - bool jcw_safe = (jcw < thread->stack_base()) && ( jcw > fp); - return jcw_safe; - } intptr_t* sender_sp = NULL; address sender_pc = NULL; --- 95,128 ---- // ok. adapter blobs never have a frame complete and are never ok. // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) { return false; } if (!_cb->is_frame_complete_at(_pc)) { if (_cb->is_nmethod() || _cb->is_adapter_blob() || _cb->is_runtime_stub()) { return false; } } + + // Could just be some random pointer within the codeBlob + if (!_cb->code_contains(_pc)) { + return false; + } + // Entry frame checks if (is_entry_frame()) { // an entry frame must have a valid fp. if (!fp_safe) return false; // Validate the JavaCallWrapper an entry frame must have address jcw = (address)entry_frame_call_wrapper(); bool jcw_safe = (jcw < thread->stack_base()) && ( jcw > fp); return jcw_safe; } intptr_t* sender_sp = NULL; address sender_pc = NULL;
src/cpu/x86/vm/frame_x86.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File