7184772: G1: Incorrect assert in HeapRegionLinkedList::add_as_head()

Tue, 17 Jul 2012 14:57:02 -0700

author
johnc
date
Tue, 17 Jul 2012 14:57:02 -0700
changeset 3955
d42fe3c3001d
parent 3954
594dff5e3c2e
child 3956
db823a892a55

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 <brandon@twitter.com>

src/share/vm/gc_implementation/g1/heapRegionSet.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp	Tue Jul 17 11:52:10 2012 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp	Tue Jul 17 14:57:02 2012 -0700
     1.3 @@ -292,7 +292,7 @@
     1.4      assert(length() >  0 && _tail != NULL, hrs_ext_msg(this, "invariant"));
     1.5      from_list->_tail->set_next(_head);
     1.6    } else {
     1.7 -    assert(length() == 0 && _head == NULL, hrs_ext_msg(this, "invariant"));
     1.8 +    assert(length() == 0 && _tail == NULL, hrs_ext_msg(this, "invariant"));
     1.9      _tail = from_list->_tail;
    1.10    }
    1.11    _head = from_list->_head;

mercurial