diff -r d70ee55535f4 -r bd4290e6d0a5 hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Tue Nov 27 14:20:21 2012 +0100 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Tue Nov 27 14:11:37 2012 -0800 @@ -49,16 +49,17 @@ char* pc = (char*)p; assert(pc >= (char*)_reserved.start() && pc < (char*)_reserved.end(), - "p not in range."); + err_msg("p (" PTR_FORMAT ") not in reserved [" PTR_FORMAT ", " PTR_FORMAT ")", + p, (char*)_reserved.start(), (char*)_reserved.end())); size_t delta = pointer_delta(pc, _reserved.start(), sizeof(char)); size_t result = delta >> LogN; - assert(result < _vs.committed_size(), "bad index from address"); + check_index(result, "bad index from address"); return result; } inline HeapWord* G1BlockOffsetSharedArray::address_for_index(size_t index) const { - assert(index < _vs.committed_size(), "bad index"); + check_index(index, "index out of range"); HeapWord* result = _reserved.start() + (index << LogN_words); assert(result >= _reserved.start() && result < _reserved.end(), err_msg("bad address from index result " PTR_FORMAT