[PATCH] Fix the region overflow condition in SanitizerAllocator64::PopulateFreeList().

Sergey Matveev earthdok at google.com
Thu May 16 04:57:08 PDT 2013



================
Comment at: lib/sanitizer_common/tests/sanitizer_allocator_test.cc:725
@@ +724,3 @@
+  ASSERT_GT(3 * kAllocationSize, kRegionSize);
+  ASSERT_DEATH(cache.Allocate(a, kClassID) && cache.Allocate(a, kClassID) &&
+                   cache.Allocate(a, kClassID),
----------------
Kostya Serebryany wrote:
> you should move the first two calls out of the ASSERT_DEATH
> Also, why not EXPECT_DEATH? 
It's actually the second call that fails, not the third one, because allocator maps an extra chunk for itself. But I don't want to make that assumption in this test. So I kept the 2nd and 3rd calls in the assertion.


http://llvm-reviews.chandlerc.com/D803



More information about the llvm-commits mailing list