提交 90c4458c 编写于 作者: J johnc

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: NBrandon Mitchell <brandon@twitter.com>
上级 784912f7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册