[Support] Fix asan AllocatorTest after ba0d50ad7e

We were counting the number of bytes allocated, but under asan there's
extra redzone bytes by default. Disable this.
This commit is contained in:
Sam McCall 2022-05-06 15:50:33 +02:00
parent cbd300f62d
commit 56ee5d9337
1 changed files with 1 additions and 0 deletions

View File

@ -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());