mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8213415: BitMap::word_index_round_up overflow problems
Limit BitMap sizes so to-word round-up can't overflow. Reviewed-by: tschatzl, stuefe
This commit is contained in:
parent
7204086e7e
commit
e70386f23a
8 changed files with 149 additions and 101 deletions
|
@ -961,7 +961,7 @@ PSParallelCompact::clear_data_covering_space(SpaceId id)
|
|||
HeapWord* const max_top = MAX2(top, _space_info[id].new_top());
|
||||
|
||||
const idx_t beg_bit = _mark_bitmap.addr_to_bit(bot);
|
||||
const idx_t end_bit = BitMap::word_align_up(_mark_bitmap.addr_to_bit(top));
|
||||
const idx_t end_bit = _mark_bitmap.align_range_end(_mark_bitmap.addr_to_bit(top));
|
||||
_mark_bitmap.clear_range(beg_bit, end_bit);
|
||||
|
||||
const size_t beg_region = _summary_data.addr_to_region_idx(bot);
|
||||
|
@ -2849,7 +2849,7 @@ PSParallelCompact::skip_live_words(HeapWord* beg, HeapWord* end, size_t count)
|
|||
ParMarkBitMap* m = mark_bitmap();
|
||||
idx_t bits_to_skip = m->words_to_bits(count);
|
||||
idx_t cur_beg = m->addr_to_bit(beg);
|
||||
const idx_t search_end = BitMap::word_align_up(m->addr_to_bit(end));
|
||||
const idx_t search_end = m->align_range_end(m->addr_to_bit(end));
|
||||
|
||||
do {
|
||||
cur_beg = m->find_obj_beg(cur_beg, search_end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue