7043891: CMS: assert(_whole_heap.contains(p)) failed: out of bounds access to card marking array

Fixed assertion checking code that was attempting to translate addresses past end of space for card-table slot. Also elaborated some assertion checking messages.

Reviewed-by: iveresov, jmasa, tonyp
This commit is contained in:
Y. Srinivas Ramakrishna 2011-05-11 15:47:12 -07:00
parent 953f34d325
commit c40a4d6878
3 changed files with 25 additions and 6 deletions

View file

@ -351,7 +351,7 @@ process_chunk_boundaries(Space* sp,
// covers.
const uintptr_t last_chunk_index_to_check = addr_to_chunk_index(last_block + last_block_size - 1)
- lowest_non_clean_base_chunk_index;
DEBUG_ONLY(const uintptr_t last_chunk_index = addr_to_chunk_index(used.end())
DEBUG_ONLY(const uintptr_t last_chunk_index = addr_to_chunk_index(used.last())
- lowest_non_clean_base_chunk_index;)
assert(last_chunk_index_to_check <= last_chunk_index,
err_msg("Out of bounds: last_chunk_index_to_check " INTPTR_FORMAT