diff --git a/llvm/unittests/Support/AllocatorTest.cpp b/llvm/unittests/Support/AllocatorTest.cpp index 665d1b7e38f0..b361b0aa7252 100644 --- a/llvm/unittests/Support/AllocatorTest.cpp +++ b/llvm/unittests/Support/AllocatorTest.cpp @@ -105,6 +105,7 @@ TEST(AllocatorTest, TestAlignment) { // we end up creating a slab for it. TEST(AllocatorTest, TestZero) { BumpPtrAllocator Alloc; + Alloc.setRedZoneSize(0); // else our arithmetic is all off EXPECT_EQ(0u, Alloc.GetNumSlabs()); EXPECT_EQ(0u, Alloc.getBytesAllocated());