7036236: VM crashes assert((!inside_attrs()) || is_error_reported()) failed ..

Eliminate the race condition.

Reviewed-by: kvn
This commit is contained in:
Igor Veresov 2011-04-14 00:02:21 -07:00
parent aac4b1553e
commit 3344bbfb29
3 changed files with 19 additions and 5 deletions

View file

@ -971,8 +971,6 @@ 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();
}