[llvm-commits] [compiler-rt] r151521 - /compiler-rt/trunk/lib/asan/asan_allocator.cc
Alexey Samsonov
samsonov at google.com
Mon Feb 27 01:06:10 PST 2012
Author: samsonov
Date: Mon Feb 27 03:06:10 2012
New Revision: 151521
URL: http://llvm.org/viewvc/llvm-project?rev=151521&view=rev
Log:
AddressSanitizer: add some checks to AsanChunkFifoList::PushList
Modified:
compiler-rt/trunk/lib/asan/asan_allocator.cc
Modified: compiler-rt/trunk/lib/asan/asan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator.cc?rev=151521&r1=151520&r2=151521&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator.cc Mon Feb 27 03:06:10 2012
@@ -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();
}
More information about the llvm-commits
mailing list