The second argument for Allocator::Deallocate is the number of elements,
not the size of a single element. In asan mode specifying a large number
of elements poisoned random memory regions, leading to crashes
everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314413
91177308-0d34-0410-b5e6-
96231b3b80d8
// Since LoopAllocator is a BumpPtrAllocator, this Deallocate only poisons
// \c L, but the pointer remains valid for non-dereferencing uses.
- LoopAllocator.Deallocate(L, sizeof(LoopT));
+ LoopAllocator.Deallocate(L);
}
};