# HG changeset patch # User Christos Kotselidis # Date 1381794648 -7200 # Node ID 98031e66de159c2ca8f3db005a2fbb9f293085f4 # Parent 5ae8c9cf46e9c85fc7b69a7860d86c6b8242144c Fix unittests diff -r 5ae8c9cf46e9 -r 98031e66de15 src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Mon Oct 14 23:38:14 2013 +0200 +++ b/src/share/vm/code/nmethod.cpp Tue Oct 15 01:50:48 2013 +0200 @@ -1484,6 +1484,12 @@ } else { 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); + } +#endif if (TraceCreateZombies) { ResourceMark m;