llvm-6502/test
Torok Edwin 15417383b9 Fix memory leak in liveintervals: the destructor for VNInfos must be called,
otherwise the SmallVector it contains doesn't free its memory.
In most cases LiveIntervalAnalysis could get away by not calling the destructor,
because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
However when the SmallVector does grow it always leaks.

This is the valgrind shown leak from the original testcase:
==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
t/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
amav.so.6.1.0)
==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
lt/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
.so.6.1.0)
==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
lamav.so.6.1.0)
==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
fault/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
ibs/libclamav.so.6.1.0)
==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 13:50:36 +00:00
..
Analysis Avoid analyzing instructions in blocks not reachable from the entry block. 2010-03-09 23:46:50 +00:00
Archive fix a broken archive that was breaking dejagnu only (not lit) 2010-02-04 07:11:08 +00:00
Assembler Add support for a union type in LLVM IR. Patch by Talin! 2010-02-12 20:49:41 +00:00
Bindings/Ocaml Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options. 2010-03-06 00:30:06 +00:00
Bitcode Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the case 2010-01-25 21:55:39 +00:00
BugPoint
CodeGen Fix memory leak in liveintervals: the destructor for VNInfos must be called, 2010-03-24 13:50:36 +00:00
DebugInfo Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit. 2010-03-22 23:11:36 +00:00
ExecutionEngine Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul, 2010-03-02 01:11:08 +00:00
Feature Revert r98666 too; it's checkin-without-testing day! 2010-03-16 20:52:59 +00:00
FrontendAda
FrontendC Testcase for pr6552. I changed the code to use "ip" instead of "fp" because 2010-03-10 17:54:11 +00:00
FrontendC++ Test case for llvm-gcc r99305. Radar 7659636. 2010-03-23 18:39:23 +00:00
FrontendFortran
FrontendObjC Testcase for r98728. 2010-03-17 17:51:08 +00:00
FrontendObjC++
Integer Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
lib Eliminate llvmgcc_version testing variable. 2010-02-23 07:56:28 +00:00
Linker
LLVMC XFAIL tests from LLVMC on valgrind or valgrind+leak-checking. We 2010-03-21 08:12:46 +00:00
MC MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore. 2010-03-20 22:36:32 +00:00
Other Constant-fold GEP-of-GEP into a single GEP. 2010-03-10 19:31:51 +00:00
Scripts Revert r98892. BSD systems may not have bash installed at all. 2010-03-19 00:32:11 +00:00
TableGen Add support for XFAILing valgrind runs with memory leak checking independently 2010-03-20 23:08:45 +00:00
Transforms add some accessors to callsite/callinst/invokeinst to check 2010-03-23 22:59:07 +00:00
Unit Try r96559 for the third time. This time the shared library is only built if 2010-02-25 06:34:33 +00:00
Verifier Delete useless trailing semicolons. 2010-01-05 17:55:26 +00:00
CMakeLists.txt Fix make check with cmake/lit 2010-03-10 18:41:59 +00:00
lit.cfg Add support for XFAILing valgrind runs with memory leak checking independently 2010-03-20 23:08:45 +00:00
lit.site.cfg.in
Makefile Try r96559 for the third time. This time the shared library is only built if 2010-02-25 06:34:33 +00:00
Makefile.tests Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX} 2010-02-23 10:28:06 +00:00
site.exp.in Eliminate llvmgcc_version testing variable. 2010-02-23 07:56:28 +00:00
TestRunner.sh