diff src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp @ 3359:7d64aa23eb96

7043891: CMS: assert(_whole_heap.contains(p)) failed: out of bounds access to card marking array Summary: 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
author ysr
date Wed, 11 May 2011 15:47:12 -0700
parents fc2b798ab316
children fe189d4a44e9 5c0a3c1858b1
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Tue May 10 12:26:10 2011 -0700
+++ b/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp	Wed May 11 15:47:12 2011 -0700
@@ -351,7 +351,7 @@
         // 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