# HG changeset patch # User Doug Simon # Date 1386084941 -3600 # Node ID 01080e31692d2cc85f584b64d25b815c48843fe9 # Parent 325b4e4efb60503546c36251357833b6e46ced92 fixed crash when TraceCreateZombies is enabled diff -r 325b4e4efb60 -r 01080e31692d src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Tue Dec 03 16:33:41 2013 +0100 +++ b/src/share/vm/code/nmethod.cpp Tue Dec 03 16:35:41 2013 +0100 @@ -1523,15 +1523,15 @@ assert(state == not_entrant, "other cases may need to be handled differently"); } #ifdef GRAAL - if (_graal_installed_code != NULL) { - // Break the link between nmethod and HotSpotInstalledCode such that the nmethod can subsequently be flushed safely. - HotSpotInstalledCode::set_codeBlob(_graal_installed_code, 0); - } + if (_graal_installed_code != NULL) { + // Break the link between nmethod and HotSpotInstalledCode such that the nmethod can subsequently be flushed safely. + HotSpotInstalledCode::set_codeBlob(_graal_installed_code, 0); + } #endif if (TraceCreateZombies) { ResourceMark m; - tty->print_cr("nmethod <" INTPTR_FORMAT "> %s code made %s", this, this->method()->name_and_sig_as_C_string(), (state == not_entrant) ? "not entrant" : "zombie"); + tty->print_cr("nmethod <" INTPTR_FORMAT "> %s code made %s", this, this->method() ? this->method()->name_and_sig_as_C_string() : "null", (state == not_entrant) ? "not entrant" : "zombie"); } NMethodSweeper::report_state_change(this);