8138922: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list

Reviewed-by: kvn, coleenp, dholmes
This commit is contained in:
Vladimir Ivanov 2016-02-15 20:26:02 +03:00
parent 596b56f6c7
commit e675738256
7 changed files with 35 additions and 54 deletions

View file

@ -291,6 +291,9 @@ MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) {
{
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) MethodHandlesAdapterBlob(size);
if (blob == NULL) {
vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CodeCache: no room for method handle adapter blob");
}
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();