mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8279969: NULL return from map_bitmap_region() needs to be checked
Reviewed-by: ccheung, coleenp
This commit is contained in:
parent
1eec16b47b
commit
1864481df1
3 changed files with 22 additions and 3 deletions
|
@ -1679,6 +1679,10 @@ void HeapShared::sort_loaded_regions(LoadedArchiveHeapRegion* loaded_regions, in
|
|||
bool HeapShared::load_regions(FileMapInfo* mapinfo, LoadedArchiveHeapRegion* loaded_regions,
|
||||
int num_loaded_regions, uintptr_t buffer) {
|
||||
uintptr_t bitmap_base = (uintptr_t)mapinfo->map_bitmap_region();
|
||||
if (bitmap_base == 0) {
|
||||
_loading_failed = true;
|
||||
return false; // OOM or CRC error
|
||||
}
|
||||
uintptr_t load_address = buffer;
|
||||
for (int i = 0; i < num_loaded_regions; i++) {
|
||||
LoadedArchiveHeapRegion* ri = &loaded_regions[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue