--- old/src/cpu/sparc/vm/frame_sparc.cpp 2013-02-18 12:53:07.000000000 +0100 +++ new/src/cpu/sparc/vm/frame_sparc.cpp 2013-02-18 12:53:07.000000000 +0100 @@ -216,6 +216,11 @@ } } + // 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. --- old/src/cpu/x86/vm/frame_x86.cpp 2013-02-18 12:53:08.000000000 +0100 +++ new/src/cpu/x86/vm/frame_x86.cpp 2013-02-18 12:53:08.000000000 +0100 @@ -97,7 +97,6 @@ // 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; } @@ -106,20 +105,22 @@ 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;