OpenJDK / amber / amber
changeset 50385:9e64b13a7fcb
8202075: Crash when running compiler/codecache/OverflowCodeCacheTest.java
Summary: add missing null check in WhiteBox::allocate_code_blob()
Reviewed-by: thartmann
author | kvn |
---|---|
date | Tue, 24 Apr 2018 10:26:54 -0700 |
parents | 26ebfe8ce852 |
children | 6d1f26b1ddfd |
files | src/hotspot/share/prims/whitebox.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/prims/whitebox.cpp Tue Apr 24 09:04:57 2018 -0700 +++ b/src/hotspot/share/prims/whitebox.cpp Tue Apr 24 10:26:54 2018 -0700 @@ -1359,7 +1359,9 @@ { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); blob = (BufferBlob*) CodeCache::allocate(full_size, blob_type); - ::new (blob) BufferBlob("WB::DummyBlob", full_size); + if (blob != NULL) { + ::new (blob) BufferBlob("WB::DummyBlob", full_size); + } } // Track memory usage statistic after releasing CodeCache_lock MemoryService::track_code_cache_memory_usage();