8249880: JVMCI calling register_nmethod without CodeCache lock

Reviewed-by: eosterlund, kvn, never
This commit is contained in:
Bob Vandette 2020-07-22 17:59:33 +00:00
parent 39b22d134f
commit 33016a8325

View File

@ -668,6 +668,7 @@ void JVMCINMethodData::set_nmethod_mirror(nmethod* nm, oop new_mirror) {
// Since we've patched some oops in the nmethod,
// (re)register it with the heap.
MutexLocker ml(CodeCache_lock, Mutex::_no_safepoint_check_flag);
Universe::heap()->register_nmethod(nm);
}