==9027== Memcheck, a memory error detector ==9027== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==9027== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info ==9027== Command: llvm-commit2/Debug+Asserts/bin/opt -no-aa -tbaa -basicaa -globalopt -ipsccp -deadargelim -instcombine -simplifycfg -basiccg -prune-eh -inline -functionattrs -scalarrepl-ssa -domtree -early-cse -simplify-libcalls -lazy-value-info -jump-threading -correlated-propagation -simplifycfg -instcombine -tailcallelim -simplifycfg -reassociate -domtree -loops -loopsimplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loopsimplify -lcssa -iv-users -indvars -loop-idiom -loop-deletion -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -jump-threading -correlated-propagation -domtree -memdep -dse -adce -simplifycfg -strip-dead-prototypes -print-used-types -deadtypeelim -constmerge -preverify -domtree -verify x.ll ==9027== WARNING: You're attempting to print out a bitcode file. This is inadvisable as it may cause display problems. If you REALLY want to taste LLVM bitcode first-hand, you can force output with the `-f' option. ==9027== Invalid read of size 8 ==9027== at 0x826116: llvm::Use::getNext() const (Use.h:108) ==9027== by 0x8269E5: llvm::value_use_iterator::operator++() (Use.h:188) ==9027== by 0x845435: llvm::PredIterator >::operator++() (CFG.h:60) ==9027== by 0x960708: (anonymous namespace)::TailCallElim::FoldReturnAndProcessPred(llvm::BasicBlock*, llvm::ReturnInst*, llvm::BasicBlock*&, bool&, llvm::SmallVector&, bool) (TailRecursionElimination.cpp:591) ==9027== by 0x95F141: (anonymous namespace)::TailCallElim::runOnFunction(llvm::Function&) (TailRecursionElimination.cpp:188) ==9027== by 0xC91F12: llvm::FPPassManager::runOnFunction(llvm::Function&) (PassManager.cpp:1483) ==9027== by 0xA29782: (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) (CallGraphSCCPass.cpp:145) ==9027== by 0xA2A5C7: (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) (CallGraphSCCPass.cpp:399) ==9027== by 0xA2A8BF: (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) (CallGraphSCCPass.cpp:454) ==9027== by 0xC9245F: llvm::MPPassManager::runOnModule(llvm::Module&) (PassManager.cpp:1557) ==9027== by 0xC9296C: llvm::PassManagerImpl::run(llvm::Module&) (PassManager.cpp:1638) ==9027== by 0xC92EC2: llvm::PassManager::run(llvm::Module&) (PassManager.cpp:1682) ==9027== Address 0x608f218 is 8 bytes inside a block of size 112 free'd ==9027== at 0x4C23E0F: operator delete(void*) (vg_replace_malloc.c:387) ==9027== by 0xCB6E1A: llvm::User::operator delete(void*) (User.cpp:78) ==9027== by 0xC7216E: llvm::BranchInst::~BranchInst() (Instructions.h:2055) ==9027== by 0x85D90B: llvm::ilist_node_traits::deleteNode(llvm::Instruction*) (ilist.h:112) ==9027== by 0x85C46A: llvm::iplist >::erase(llvm::ilist_iterator) (ilist.h:463) ==9027== by 0xC5CC87: llvm::Instruction::eraseFromParent() (Instruction.cpp:72) ==9027== by 0x9DA748: llvm::FoldReturnIntoUncondBranch(llvm::ReturnInst*, llvm::BasicBlock*, llvm::BasicBlock*) (BasicBlockUtils.cpp:538) ==9027== by 0x9606C0: (anonymous namespace)::TailCallElim::FoldReturnAndProcessPred(llvm::BasicBlock*, llvm::ReturnInst*, llvm::BasicBlock*&, bool&, llvm::SmallVector&, bool) (TailRecursionElimination.cpp:604) ==9027== by 0x95F141: (anonymous namespace)::TailCallElim::runOnFunction(llvm::Function&) (TailRecursionElimination.cpp:188) ==9027== by 0xC91F12: llvm::FPPassManager::runOnFunction(llvm::Function&) (PassManager.cpp:1483) ==9027== by 0xA29782: (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) (CallGraphSCCPass.cpp:145) ==9027== by 0xA2A5C7: (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) (CallGraphSCCPass.cpp:399) ==9027== ==9027== ==9027== HEAP SUMMARY: ==9027== in use at exit: 64 bytes in 3 blocks ==9027== total heap usage: 591,921 allocs, 591,918 frees, 200,342,102 bytes allocated ==9027== ==9027== LEAK SUMMARY: ==9027== definitely lost: 0 bytes in 0 blocks ==9027== indirectly lost: 0 bytes in 0 blocks ==9027== possibly lost: 0 bytes in 0 blocks ==9027== still reachable: 64 bytes in 3 blocks ==9027== suppressed: 0 bytes in 0 blocks ==9027== Rerun with --leak-check=full to see details of leaked memory ==9027== ==9027== For counts of detected and suppressed errors, rerun with: -v ==9027== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 4 from 4)