[LLVMbugs] [Bug 912] NEW: valgrind finds error in DSE using AliasAnalysis

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Sep 14 11:47:18 PDT 2006


http://llvm.org/bugs/show_bug.cgi?id=912

           Summary: valgrind finds error in DSE using AliasAnalysis
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca


The DSE seems to have some sort of hard to trigger memory error, caught by valgrind:

$ valgrind opt bugpoint-reduced-simplified.bc -dse
==13389== Memcheck, a memory error detector.
==13389== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==13389== Using LibVEX rev 1606, a library for dynamic binary translation.
==13389== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==13389== Using valgrind-3.2.0-Debian, a dynamic binary instrumentation framework.
==13389== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==13389== For more details, rerun with: -v
==13389== 
WARNING: You're attempting to print out a bytecode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bytecode first-hand, you
can force output with the `-f' option.

==13389== Invalid read of size 4
==13389==    at 0x8440A8F: std::equal_to<llvm::Value*>::operator()(llvm::Value*
const&, llvm::Value* const&) const (stl_function.h:200)
==13389==    by 0x85E9319: __gnu_cxx::hashtable<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec>, llvm::Value*, __gnu_cxx::hash<llvm::Value*>,
std::_Select1st<std::pair<llvm::Value* const, llvm::AliasSet::PointerRec> >,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::erase(llvm::Value* const&) (hashtable.h:895)
==13389==    by 0x85E937D: __gnu_cxx::hash_map<llvm::Value*,
llvm::AliasSet::PointerRec, __gnu_cxx::hash<llvm::Value*>,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::erase(llvm::Value* const&) (hash_map:249)
==13389==    by 0x85E6A7E: llvm::AliasSetTracker::remove(llvm::AliasSet&)
(AliasSetTracker.cpp:377)
==13389==    by 0x85E804A: llvm::AliasSetTracker::remove(llvm::LoadInst*)
(AliasSetTracker.cpp:397)
==13389==    by 0x85E8087: llvm::AliasSetTracker::remove(llvm::Instruction*)
(AliasSetTracker.cpp:430)
==13389==    by 0x850CA62: (anonymous
namespace)::DSE::runOnBasicBlock(llvm::BasicBlock&) (DeadStoreElimination.cpp:108)
==13389==    by 0x850D408: (anonymous
namespace)::DSE::runOnFunction(llvm::Function&) (DeadStoreElimination.cpp:39)
==13389==    by 0x86B9796:
llvm::FunctionPassManagerT::runPass(llvm::FunctionPass*, llvm::Function*)
(PassManagerT.h:804)
==13389==    by 0x86CEF5F:
llvm::PassManagerT<llvm::FTraits>::runPasses(llvm::Function*,
std::map<llvm::Pass*, std::vector<llvm::Pass*, std::allocator<llvm::Pass*> >,
std::less<llvm::Pass*>, std::allocator<std::pair<llvm::Pass* const,
std::vector<llvm::Pass*, std::allocator<llvm::Pass*> > > > >&) (PassManagerT.h:596)
==13389==    by 0x86CF96F:
llvm::PassManagerT<llvm::FTraits>::runOnUnit(llvm::Function*) (PassManagerT.h:282)
==13389==    by 0x86B9878:
llvm::FunctionPassManagerT::runOnFunction(llvm::Function&) (PassManagerT.h:896)
==13389==  Address 0x73470FC is 4 bytes inside a block of size 24 free'd
==13389==    at 0x53FC422: operator delete(void*) (vg_replace_malloc.c:244)
==13389==    by 0x8417ABE:
__gnu_cxx::new_allocator<__gnu_cxx::_Hashtable_node<std::pair<llvm::Value*
const, llvm::AliasSet::PointerRec> >
>::deallocate(__gnu_cxx::_Hashtable_node<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec> >*, unsigned) (new_allocator.h:94)
==13389==    by 0x8417AE3: __gnu_cxx::hashtable<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec>, llvm::Value*, __gnu_cxx::hash<llvm::Value*>,
std::_Select1st<std::pair<llvm::Value* const, llvm::AliasSet::PointerRec> >,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::_M_put_node(__gnu_cxx::_Hashtable_node<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec> >*) (hashtable.h:301)
==13389==    by 0x8417B33: __gnu_cxx::hashtable<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec>, llvm::Value*, __gnu_cxx::hash<llvm::Value*>,
std::_Select1st<std::pair<llvm::Value* const, llvm::AliasSet::PointerRec> >,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::_M_delete_node(__gnu_cxx::_Hashtable_node<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec> >*) (hashtable.h:623)
==13389==    by 0x85E92B2: __gnu_cxx::hashtable<std::pair<llvm::Value* const,
llvm::AliasSet::PointerRec>, llvm::Value*, __gnu_cxx::hash<llvm::Value*>,
std::_Select1st<std::pair<llvm::Value* const, llvm::AliasSet::PointerRec> >,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::erase(llvm::Value* const&) (hashtable.h:884)
==13389==    by 0x85E937D: __gnu_cxx::hash_map<llvm::Value*,
llvm::AliasSet::PointerRec, __gnu_cxx::hash<llvm::Value*>,
std::equal_to<llvm::Value*>, std::allocator<llvm::AliasSet::PointerRec>
>::erase(llvm::Value* const&) (hash_map:249)
==13389==    by 0x85E6A7E: llvm::AliasSetTracker::remove(llvm::AliasSet&)
(AliasSetTracker.cpp:377)
==13389==    by 0x85E804A: llvm::AliasSetTracker::remove(llvm::LoadInst*)
(AliasSetTracker.cpp:397)
==13389==    by 0x85E8087: llvm::AliasSetTracker::remove(llvm::Instruction*)
(AliasSetTracker.cpp:430)
==13389==    by 0x850CA62: (anonymous
namespace)::DSE::runOnBasicBlock(llvm::BasicBlock&) (DeadStoreElimination.cpp:108)
==13389==    by 0x850D408: (anonymous
namespace)::DSE::runOnFunction(llvm::Function&) (DeadStoreElimination.cpp:39)
==13389==    by 0x86B9796:
llvm::FunctionPassManagerT::runPass(llvm::FunctionPass*, llvm::Function*)
(PassManagerT.h:804)
==13389== 
==13389== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 27 from 1)
==13389== malloc/free: in use at exit: 99,867 bytes in 1,003 blocks.
==13389== malloc/free: 18,318 allocs, 17,315 frees, 614,957 bytes allocated.
==13389== For counts of detected errors, rerun with: -v
==13389== searching for pointers to 1,003 not-freed blocks.
==13389== checked 415,884 bytes.
==13389== 
==13389== LEAK SUMMARY:
==13389==    definitely lost: 99,608 bytes in 995 blocks.
==13389==      possibly lost: 43 bytes in 1 blocks.
==13389==    still reachable: 216 bytes in 7 blocks.
==13389==         suppressed: 0 bytes in 0 blocks.
==13389== Use --leak-check=full to see details of leaked memory.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list