[LLVMbugs] [Bug 6637] New: SCEVs are allocated with BumpPtrAllocator but have members that need destruction
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 17 09:45:32 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6637
Summary: SCEVs are allocated with BumpPtrAllocator but have
members that need destruction
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
AssignedTo: gohman at apple.com
ReportedBy: jyasskin at google.com
CC: llvmbugs at cs.uiuc.edu
For example, SCEV is a FastFoldingSetNode, which includes a
SmallVector<unsigned, 32>. SCEVNAryExpr additionally contains a
SmallVector<const SCEV *, 8>.
Example leak report, by running `valgrind --leak-check=full opt ...`:
******************** TEST 'LLVM ::
Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll' FAILED ********************
Script:
--
opt <
/home/jyasskin/llvm/src/test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll
-analyze -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck
/home/jyasskin/llvm/src/test/Analysis/ScalarEvolution/2008-08-04-LongAddRec.ll
--
Exit Code: 1
Command Output (stdout):
--
Command has output on stderr!
--
Command Output (stderr):
--
==2116== 1,024 bytes in 4 blocks are definitely lost in loss record 265 of 269
==2116== at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==2116== by 0xBDD610: llvm::SmallVectorBase::grow_pod(unsigned long,
unsigned long) (SmallVector.cpp:24)
==2116== by 0x846A7B: llvm::SmallVectorTemplateBase<unsigned int,
true>::grow(unsigned long) (SmallVector.h:249)
==2116== by 0x84694D: llvm::SmallVectorImpl<unsigned
int>::operator=(llvm::SmallVectorImpl<unsigned int> const&) (SmallVector.h:619)
==2116== by 0x9DFBA0: llvm::SmallVector<unsigned int,
32u>::SmallVector(llvm::SmallVector<unsigned int, 32u> const&)
(SmallVector.h:683)
==2116== by 0x9DF932:
llvm::FoldingSetNodeID::FoldingSetNodeID(llvm::FoldingSetNodeID const&)
(FoldingSet.h:205)
==2116== by 0x9DF968:
llvm::FastFoldingSetNode::FastFoldingSetNode(llvm::FoldingSetNodeID const&)
(FoldingSet.h:447)
==2116== by 0xA3EB99: llvm::SCEV::SCEV(llvm::FoldingSetNodeID const&,
unsigned int) (ScalarEvolution.h:68)
==2116== by 0xA3EF69:
llvm::SCEVNAryExpr::SCEVNAryExpr(llvm::FoldingSetNodeID const&,
llvm::SCEVTypes, llvm::SmallVectorImpl<llvm::SCEV const*> const&)
(ScalarEvolutionExpressions.h:187)
==2116== by 0xA3F7F1:
llvm::SCEVAddRecExpr::SCEVAddRecExpr(llvm::FoldingSetNodeID const&,
llvm::SmallVectorImpl<llvm::SCEV const*> const&, llvm::Loop const*)
(ScalarEvolutionExpressions.h:394)
==2116== by 0xA2B454:
llvm::ScalarEvolution::getAddRecExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
llvm::Loop const*, bool, bool) (ScalarEvolution.cpp:2034)
==2116== by 0xA2AD89: llvm::ScalarEvolution::getAddRecExpr(llvm::SCEV
const*, llvm::SCEV const*, llvm::Loop const*, bool, bool)
(ScalarEvolution.cpp:1942)
==2116==
==2116== 1,024 bytes in 4 blocks are definitely lost in loss record 266 of 269
==2116== at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==2116== by 0xBDD610: llvm::SmallVectorBase::grow_pod(unsigned long,
unsigned long) (SmallVector.cpp:24)
==2116== by 0x846A7B: llvm::SmallVectorTemplateBase<unsigned int,
true>::grow(unsigned long) (SmallVector.h:249)
==2116== by 0x84694D: llvm::SmallVectorImpl<unsigned
int>::operator=(llvm::SmallVectorImpl<unsigned int> const&) (SmallVector.h:619)
==2116== by 0x9DFBA0: llvm::SmallVector<unsigned int,
32u>::SmallVector(llvm::SmallVector<unsigned int, 32u> const&)
(SmallVector.h:683)
==2116== by 0x9DF932:
llvm::FoldingSetNodeID::FoldingSetNodeID(llvm::FoldingSetNodeID const&)
(FoldingSet.h:205)
==2116== by 0x9DF968:
llvm::FastFoldingSetNode::FastFoldingSetNode(llvm::FoldingSetNodeID const&)
(FoldingSet.h:447)
==2116== by 0xA3EB99: llvm::SCEV::SCEV(llvm::FoldingSetNodeID const&,
unsigned int) (ScalarEvolution.h:68)
==2116== by 0xA3EF69:
llvm::SCEVNAryExpr::SCEVNAryExpr(llvm::FoldingSetNodeID const&,
llvm::SCEVTypes, llvm::SmallVectorImpl<llvm::SCEV const*> const&)
(ScalarEvolutionExpressions.h:187)
==2116== by 0xA3F7F1:
llvm::SCEVAddRecExpr::SCEVAddRecExpr(llvm::FoldingSetNodeID const&,
llvm::SmallVectorImpl<llvm::SCEV const*> const&, llvm::Loop const*)
(ScalarEvolutionExpressions.h:394)
==2116== by 0xA2B454:
llvm::ScalarEvolution::getAddRecExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
llvm::Loop const*, bool, bool) (ScalarEvolution.cpp:2034)
==2116== by 0xA28A2A:
llvm::ScalarEvolution::getAddExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
bool, bool) (ScalarEvolution.cpp:1588)
==2116==
==2116== 1,304 bytes in 10 blocks are definitely lost in loss record 267 of 269
==2116== at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==2116== by 0xBDD610: llvm::SmallVectorBase::grow_pod(unsigned long,
unsigned long) (SmallVector.cpp:24)
==2116== by 0x84F917: llvm::SmallVectorTemplateBase<llvm::SCEV const*,
true>::grow(unsigned long) (SmallVector.h:249)
==2116== by 0x8869DA: void llvm::SmallVectorImpl<llvm::SCEV
const*>::append<llvm::SCEV const* const*>(llvm::SCEV const* const*, llvm::SCEV
const* const*) (SmallVector.h:345)
==2116== by 0x883F03: llvm::SmallVector<llvm::SCEV const*,
8u>::SmallVector<llvm::SCEV const* const*>(llvm::SCEV const* const*, llvm::SCEV
const* const*) (SmallVector.h:678)
==2116== by 0xA3EFAF:
llvm::SCEVNAryExpr::SCEVNAryExpr(llvm::FoldingSetNodeID const&,
llvm::SCEVTypes, llvm::SmallVectorImpl<llvm::SCEV const*> const&)
(ScalarEvolutionExpressions.h:187)
==2116== by 0xA3F7F1:
llvm::SCEVAddRecExpr::SCEVAddRecExpr(llvm::FoldingSetNodeID const&,
llvm::SmallVectorImpl<llvm::SCEV const*> const&, llvm::Loop const*)
(ScalarEvolutionExpressions.h:394)
==2116== by 0xA2B454:
llvm::ScalarEvolution::getAddRecExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
llvm::Loop const*, bool, bool) (ScalarEvolution.cpp:2034)
==2116== by 0xA2AD89: llvm::ScalarEvolution::getAddRecExpr(llvm::SCEV
const*, llvm::SCEV const*, llvm::Loop const*, bool, bool)
(ScalarEvolution.cpp:1942)
==2116== by 0xA2E329:
llvm::ScalarEvolution::createNodeForPHI(llvm::PHINode*)
(ScalarEvolution.cpp:2656)
==2116== by 0xA32BB0: llvm::ScalarEvolution::createSCEV(llvm::Value*)
(ScalarEvolution.cpp:3311)
==2116== by 0xA2CDC4: llvm::ScalarEvolution::getSCEV(llvm::Value*)
(ScalarEvolution.cpp:2360)
==2116==
==2116== 1,304 bytes in 10 blocks are definitely lost in loss record 268 of 269
==2116== at 0x4C229C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==2116== by 0xBDD610: llvm::SmallVectorBase::grow_pod(unsigned long,
unsigned long) (SmallVector.cpp:24)
==2116== by 0x84F917: llvm::SmallVectorTemplateBase<llvm::SCEV const*,
true>::grow(unsigned long) (SmallVector.h:249)
==2116== by 0x8869DA: void llvm::SmallVectorImpl<llvm::SCEV
const*>::append<llvm::SCEV const* const*>(llvm::SCEV const* const*, llvm::SCEV
const* const*) (SmallVector.h:345)
==2116== by 0x883F03: llvm::SmallVector<llvm::SCEV const*,
8u>::SmallVector<llvm::SCEV const* const*>(llvm::SCEV const* const*, llvm::SCEV
const* const*) (SmallVector.h:678)
==2116== by 0xA3EFAF:
llvm::SCEVNAryExpr::SCEVNAryExpr(llvm::FoldingSetNodeID const&,
llvm::SCEVTypes, llvm::SmallVectorImpl<llvm::SCEV const*> const&)
(ScalarEvolutionExpressions.h:187)
==2116== by 0xA3F7F1:
llvm::SCEVAddRecExpr::SCEVAddRecExpr(llvm::FoldingSetNodeID const&,
llvm::SmallVectorImpl<llvm::SCEV const*> const&, llvm::Loop const*)
(ScalarEvolutionExpressions.h:394)
==2116== by 0xA2B454:
llvm::ScalarEvolution::getAddRecExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
llvm::Loop const*, bool, bool) (ScalarEvolution.cpp:2034)
==2116== by 0xA28A2A:
llvm::ScalarEvolution::getAddExpr(llvm::SmallVectorImpl<llvm::SCEV const*>&,
bool, bool) (ScalarEvolution.cpp:1588)
==2116== by 0x84E636: llvm::ScalarEvolution::getAddExpr(llvm::SCEV const*,
llvm::SCEV const*, bool, bool) (ScalarEvolution.h:416)
==2116== by 0xA318C3: llvm::ScalarEvolution::createSCEV(llvm::Value*)
(ScalarEvolution.cpp:3134)
==2116== by 0xA2CDC4: llvm::ScalarEvolution::getSCEV(llvm::Value*)
(ScalarEvolution.cpp:2360)
==2116==
--
********************
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list