mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6728478: Assertion at parallel promotion from young to old generation
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
This commit is contained in:
parent
6804a4e8ef
commit
befe056b42
2 changed files with 7 additions and 1 deletions
|
@ -229,7 +229,7 @@ void ParGCAllocBufferWithBOT::retire(bool end_of_gc, bool retain) {
|
||||||
HeapWord* first_card_start = _bsa->address_for_index(first_card_index);
|
HeapWord* first_card_start = _bsa->address_for_index(first_card_index);
|
||||||
if (first_card_start < pre_top) {
|
if (first_card_start < pre_top) {
|
||||||
HeapWord* second_card_start =
|
HeapWord* second_card_start =
|
||||||
_bsa->address_for_index(first_card_index + 1);
|
_bsa->inc_by_region_size(first_card_start);
|
||||||
|
|
||||||
// Ensure enough room to fill with the smallest block
|
// Ensure enough room to fill with the smallest block
|
||||||
second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve);
|
second_card_start = MAX2(second_card_start, pre_top + AlignmentReserve);
|
||||||
|
|
|
@ -199,6 +199,12 @@ public:
|
||||||
// "index" in "_offset_array".
|
// "index" in "_offset_array".
|
||||||
HeapWord* address_for_index(size_t index) const;
|
HeapWord* address_for_index(size_t index) const;
|
||||||
|
|
||||||
|
// Return the address "p" incremented by the size of
|
||||||
|
// a region. This method does not align the address
|
||||||
|
// returned to the start of a region. It is a simple
|
||||||
|
// primitive.
|
||||||
|
HeapWord* inc_by_region_size(HeapWord* p) const { return p + N_words; }
|
||||||
|
|
||||||
// Shared space support
|
// Shared space support
|
||||||
void serialize(SerializeOopClosure* soc, HeapWord* start, HeapWord* end);
|
void serialize(SerializeOopClosure* soc, HeapWord* start, HeapWord* end);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue