From b02f52d6bfc7129043305d2f4a8fd070b36496ed Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 28 Sep 2017 12:53:20 +0000 Subject: [PATCH] [LoopInfo] Don't poison random memory regions. 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 --- include/llvm/Analysis/LoopInfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index cb0db27ed83..4d3da873ac5 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -738,7 +738,7 @@ protected: // 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); } }; -- 2.49.0