# HG changeset patch # User ehelin # Date 1505479633 -7200 # Node ID 4f26db3c02af7b330403fdc95369bc2d3e9140e9 # Parent 6210a27c3704a9d1d2441b3e2428ff128165b8a2 8187578: BitMap::reallocate should check if old_map is NULL Reviewed-by: stefank, eosterlund, dholmes diff -r 6210a27c3704 -r 4f26db3c02af src/hotspot/share/utilities/bitMap.cpp --- a/src/hotspot/share/utilities/bitMap.cpp Tue Oct 10 19:18:36 2017 -0700 +++ b/src/hotspot/share/utilities/bitMap.cpp Fri Sep 15 14:47:13 2017 +0200 @@ -81,8 +81,10 @@ if (new_size_in_words > 0) { map = allocator.allocate(new_size_in_words); - Copy::disjoint_words((HeapWord*)old_map, (HeapWord*) map, - MIN2(old_size_in_words, new_size_in_words)); + if (old_map != NULL) { + Copy::disjoint_words((HeapWord*)old_map, (HeapWord*) map, + MIN2(old_size_in_words, new_size_in_words)); + } if (new_size_in_words > old_size_in_words) { clear_range_of_words(map, old_size_in_words, new_size_in_words);