8253833: mutexLocker assert_locked_or_safepoint should not access VMThread state from non-VM-thread

Reviewed-by: shade, coleenp, dcubed, dholmes
This commit is contained in:
Robbin Ehn 2020-10-12 06:01:31 +00:00
parent 77c776275e
commit 45b09a3f25

View file

@ -169,9 +169,6 @@ void assert_locked_or_safepoint(const Mutex* lock) {
if (lock->owned_by_self()) return;
if (SafepointSynchronize::is_at_safepoint()) return;
if (!Universe::is_fully_initialized()) return;
// see if invoker of VM operation owns it
VM_Operation* op = VMThread::vm_operation();
if (op != NULL && op->calling_thread() == lock->owner()) return;
fatal("must own lock %s", lock->name());
}