提交 5413f3b9 编写于 作者: N never

7034957: acquiring lock CodeCache_lock/1 out of order with lock tty_lock/0 -- possible deadlock

Reviewed-by: iveresov
上级 ea8e16c0
......@@ -971,6 +971,8 @@ size_t CodeCache::largest_free_block() {
if (CodeCache_lock->owned_by_self()) {
return _heap->largest_free_block();
} else {
// Avoid lock ordering problems with ttyLock.
ttyUnlocker ttyul;
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
return _heap->largest_free_block();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册