aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-09-28 12:53:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-09-28 12:53:20 +0000
commitb02f52d6bfc7129043305d2f4a8fd070b36496ed (patch)
treeb818b06151df96145677962af9af6fad59392f13 /include
parent5133f6fc61d9ff0dea461c8875ac53c113334355 (diff)
[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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LoopInfo.h2
1 files changed, 1 insertions, 1 deletions
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);
}
};