mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8217309: ZGC: Fix ZNMethodTable corruption
Reviewed-by: eosterlund, stefank
This commit is contained in:
parent
25bd20f5d9
commit
ad65ea3c85
3 changed files with 14 additions and 20 deletions
|
@ -1100,7 +1100,11 @@ void nmethod::make_unloaded() {
|
|||
"must be at safepoint");
|
||||
|
||||
// Unregister must be done before the state change
|
||||
Universe::heap()->unregister_nmethod(this);
|
||||
{
|
||||
MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
|
||||
Mutex::_no_safepoint_check_flag);
|
||||
Universe::heap()->unregister_nmethod(this);
|
||||
}
|
||||
|
||||
// Log the unloading.
|
||||
log_state_change();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue