changeset 26572:d5e6cac59ba1

8057910: G1: BOT verification should not pass top Reviewed-by: stefank, tschatzl
author brutisso
date Tue, 09 Sep 2014 14:27:10 +0200
parents 5fe42815e865
children dca8faae7397
files hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Mon Sep 08 10:41:06 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp	Tue Sep 09 14:27:10 2014 +0200
@@ -370,8 +370,9 @@
 }
 
 void G1BlockOffsetArray::verify() const {
+  assert(gsp()->bottom() < gsp()->top(), "Only non-empty regions should be verified.");
   size_t start_card = _array->index_for(gsp()->bottom());
-  size_t end_card = _array->index_for(gsp()->top());
+  size_t end_card = _array->index_for(gsp()->top() - 1);
 
   for (size_t current_card = start_card; current_card < end_card; current_card++) {
     u_char entry = _array->offset_array(current_card);