BumpPtrAllocator::Reset should also poison the first slab which doesn't get deallocated.
authorPete Cooper <peter_cooper@apple.com>
Mon, 11 Jan 2016 21:28:03 +0000 (21:28 +0000)
committerPete Cooper <peter_cooper@apple.com>
Mon, 11 Jan 2016 21:28:03 +0000 (21:28 +0000)
commit37aa498e312aab2e7ddb22f687c1b7a32d679d0c
tree62f81aa3959bf7d8209e8de987a2654416ab411b
parentea5802f21214d1a606eb3fe6239bda938f9bd006
BumpPtrAllocator::Reset should also poison the first slab which doesn't get deallocated.

When asan is enabled, we poison slabs as we allocate them, and only unpoison the pieces
we need from the slab.

However, in Reset, we were failing to reset the state of the slab back to being poisoned.

Patch by b17 c0de.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257388 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Allocator.h