Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parNew/parGCAllocBuffer.cpp @ 301:387a62b4be60
6728478: Assertion at parallel promotion from young to old generation
Summary: The fix avoids a call to address_for_index() in this particular situation where it is not known if the passed index is in bounds.
Reviewed-by: tonyp
author | jmasa |
---|---|
date | Wed, 20 Aug 2008 23:05:04 -0700 |
parents | d1605aabd0a1 |
children | 7d7a7c599c17 |
comparison
equal
deleted
inserted
replaced
300:bfcb639d5bca | 301:387a62b4be60 |
---|---|
227 // the first card with a garbage object. | 227 // the first card with a garbage object. |
228 size_t first_card_index = _bsa->index_for(pre_top); | 228 size_t first_card_index = _bsa->index_for(pre_top); |
229 HeapWord* first_card_start = _bsa->address_for_index(first_card_index); | 229 HeapWord* first_card_start = _bsa->address_for_index(first_card_index); |
230 if (first_card_start < pre_top) { | 230 if (first_card_start < pre_top) { |
231 HeapWord* second_card_start = | 231 HeapWord* second_card_start = |
232 _bsa->address_for_index(first_card_index + 1); | 232 _bsa->inc_by_region_size(first_card_start); |
233 | 233 |
234 // Ensure enough room to fill with the smallest block | 234 // Ensure enough room to fill with the smallest block |
235 second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve); | 235 second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve); |
236 | 236 |
237 // If the end is already in the first card, don't go beyond it! | 237 // If the end is already in the first card, don't go beyond it! |