# HG changeset patch # User johnc # Date 1342562222 25200 # Node ID d42fe3c3001d77c7fd9ca7481445b1cd3171a34b # Parent 594dff5e3c2ea28eb1fc879fd3adb0bea55a5721 7184772: G1: Incorrect assert in HeapRegionLinkedList::add_as_head() Summary: Assertion incorrectly checks that _head is NULL and should be checking that _tail is NULL instead. Reviewed-by: johnc Contributed-by: Brandon Mitchell diff -r 594dff5e3c2e -r d42fe3c3001d src/share/vm/gc_implementation/g1/heapRegionSet.cpp --- a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Tue Jul 17 11:52:10 2012 -0700 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp Tue Jul 17 14:57:02 2012 -0700 @@ -292,7 +292,7 @@ assert(length() > 0 && _tail != NULL, hrs_ext_msg(this, "invariant")); from_list->_tail->set_next(_head); } else { - assert(length() == 0 && _head == NULL, hrs_ext_msg(this, "invariant")); + assert(length() == 0 && _tail == NULL, hrs_ext_msg(this, "invariant")); _tail = from_list->_tail; } _head = from_list->_head;