AddressSanitizer: add some checks to AsanChunkFifoList::PushList

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@151521 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_allocator.cc b/lib/asan/asan_allocator.cc
index 5ac22df..89746eb 100644
--- a/lib/asan/asan_allocator.cc
+++ b/lib/asan/asan_allocator.cc
@@ -249,6 +249,7 @@
 
 
 void AsanChunkFifoList::PushList(AsanChunkFifoList *q) {
+  CHECK(q->size() > 0);
   if (last_) {
     CHECK(first_);
     CHECK(!last_->next);
@@ -258,7 +259,10 @@
     CHECK(!first_);
     last_ = q->last_;
     first_ = q->first_;
+    CHECK(first_);
   }
+  CHECK(last_);
+  CHECK(!last_->next);
   size_ += q->size();
   q->clear();
 }