From 90c4458ca1876264bec1a065d536d1ece383fab3 Mon Sep 17 00:00:00 2001 From: johnc Date: Tue, 17 Jul 2012 14:57:02 -0700 Subject: [PATCH] 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 --- src/share/vm/gc_implementation/g1/heapRegionSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp index ac5f96b90..cc221fa88 100644 --- a/src/share/vm/gc_implementation/g1/heapRegionSet.cpp +++ b/src/share/vm/gc_implementation/g1/heapRegionSet.cpp @@ -292,7 +292,7 @@ void HeapRegionLinkedList::add_as_head(HeapRegionLinkedList* from_list) { 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; -- GitLab