forked from OSchip/llvm-project
AddressSanitizer: add some checks to AsanChunkFifoList::PushList
llvm-svn: 151521
This commit is contained in:
parent
7a5fdd8746
commit
a1a3a2ffc3
|
@ -249,6 +249,7 @@ static AsanChunk *PtrToChunk(uintptr_t ptr) {
|
|||
|
||||
|
||||
void AsanChunkFifoList::PushList(AsanChunkFifoList *q) {
|
||||
CHECK(q->size() > 0);
|
||||
if (last_) {
|
||||
CHECK(first_);
|
||||
CHECK(!last_->next);
|
||||
|
@ -258,7 +259,10 @@ void AsanChunkFifoList::PushList(AsanChunkFifoList *q) {
|
|||
CHECK(!first_);
|
||||
last_ = q->last_;
|
||||
first_ = q->first_;
|
||||
CHECK(first_);
|
||||
}
|
||||
CHECK(last_);
|
||||
CHECK(!last_->next);
|
||||
size_ += q->size();
|
||||
q->clear();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue