--- old/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-28 11:02:26.892058615 +0100 +++ new/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-01-28 11:02:26.824056651 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -434,13 +434,12 @@ // If we finish the above loop...We have a parseable object that // begins on or before the start of the memory region, and ends // inside or spans the entire region. - assert(cur <= start, "Loop postcondition"); + assert(obj->klass_or_null() != NULL, "Loop invariant"); do { - assert(obj->klass_or_null() != NULL, "Loop invariant"); + obj = oop(cur); assert((cur + block_size(cur)) > (HeapWord*)obj, "Loop invariant"); - assert(obj == oop(cur), "Loop invariant"); if (obj->klass_or_null() == NULL) { // Ran into an unparseable point. return cur; @@ -450,7 +449,7 @@ cur = cur + block_size(cur); if (!g1h->is_obj_dead(obj)) { - // Non-object arrays are sometimes marked imprecise at the object start. We + // Non-objArrays are sometimes marked imprecise at the object start. We // always need to iterate over them in full. // We only iterate over object arrays in full if they are completely contained // in the memory region. @@ -460,7 +459,6 @@ obj->oop_iterate(cl, mr); } } - obj = oop(cur); } while (cur < end); return NULL; @@ -675,7 +673,6 @@ template void do_oop_work(T* p) { -// gclog_or_tty->print_cr("Verifying address " PTR_FORMAT, p2i(p)); assert(_containing_obj != NULL, "Precondition"); assert(!_g1h->is_obj_dead_cond(_containing_obj, _vo), "Precondition");