# HG changeset patch # User Andreas Woess # Date 1327496999 -3600 # Node ID 125678ef7587bce95035fa791c57bb98b5ca0548 # Parent 3c21eee8ab4d2b8d1a490e27cf8643b08122cb2b Fix compiled method unloading. diff -r 3c21eee8ab4d -r 125678ef7587 src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Tue Jan 24 19:17:28 2012 +0100 +++ b/src/share/vm/code/nmethod.cpp Wed Jan 25 14:09:59 2012 +0100 @@ -1235,6 +1235,14 @@ } _method = NULL; // Clear the method of this dead nmethod } + +#ifdef GRAAL + if (_graal_compiled_method != NULL) { + HotSpotCompiledMethod::set_nmethod(_graal_compiled_method, 0); + _graal_compiled_method = NULL; + } +#endif + // Make the class unloaded - i.e., change state and notify sweeper assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint"); if (is_in_use()) {