# HG changeset patch # User lana # Date 1495759512 0 # Node ID 531cb9202a0fedc226c03f72511adcd6f9a295ec # Parent 38566827540046f9c7f750e0679523e1b3ed312d# Parent 63ac6d565c21a732e5fc5f8dd4073d6e44867b18 Merge diff -r 385668275400 -r 531cb9202a0f src/share/vm/code/relocInfo.cpp --- a/src/share/vm/code/relocInfo.cpp Fri May 26 00:29:12 2017 +0000 +++ b/src/share/vm/code/relocInfo.cpp Fri May 26 00:45:12 2017 +0000 @@ -129,9 +129,9 @@ if (nm == NULL && begin != NULL) { // allow nmethod to be deduced from beginning address CodeBlob* cb = CodeCache::find_blob(begin); - nm = cb->as_compiled_method_or_null(); + nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL; } - assert(nm != NULL, "must be able to deduce nmethod from other arguments"); + guarantee(nm != NULL, "must be able to deduce nmethod from other arguments"); _code = nm; _current = nm->relocation_begin() - 1; diff -r 385668275400 -r 531cb9202a0f src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Fri May 26 00:29:12 2017 +0000 +++ b/src/share/vm/runtime/sharedRuntime.cpp Fri May 26 00:45:12 2017 +0000 @@ -549,7 +549,7 @@ CodeBlob *cb = CodeCache::find_blob(pc); // Should be an nmethod - assert(cb && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod"); + guarantee(cb != NULL && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod"); // Look up the relocation information assert(((CompiledMethod*)cb)->is_at_poll_or_poll_return(pc), @@ -1802,7 +1802,7 @@ if (destination != entry_point) { CodeBlob* callee = CodeCache::find_blob(destination); // callee == cb seems weird. It means calling interpreter thru stub. - if (callee == cb || callee->is_adapter_blob()) { + if (callee != NULL && (callee == cb || callee->is_adapter_blob())) { // static call or optimized virtual if (TraceCallFixup) { tty->print("fixup callsite at " INTPTR_FORMAT " to compiled code for", p2i(caller_pc)); @@ -1851,7 +1851,7 @@ // ask me how I know this... CodeBlob* cb = CodeCache::find_blob(caller_pc); - if (!cb->is_compiled() || entry_point == moop->get_c2i_entry()) { + if (cb == NULL || !cb->is_compiled() || entry_point == moop->get_c2i_entry()) { return; }