[LLVMbugs] [Bug 6339] New: 'Canonicalize Induction Variables' pass crashes on attached input

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 17 21:42:49 PST 2010


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

           Summary: 'Canonicalize Induction Variables' pass crashes on
                    attached input
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: cdavis at mymail.mines.edu
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4250)
 --> (http://llvm.org/bugs/attachment.cgi?id=4250)
Input that causes crash (out of memory)

The attached input brings down the loop optimizer like so:

$ opt bugpoint-reduced-simplified.bc -inline -scalarrepl -loop-rotate
-instcombine -scalar-evolution -indvars -loop-deletion -verify

opt(36546) malloc: *** mmap(size=18446744073709543424) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
0  opt               0x0000000100435075 PrintStackTrace(void*) + 38
1  opt               0x000000010043556c SignalHandler(int) + 336
2  libSystem.B.dylib 0x00007fff82a9aeaa _sigtramp + 26
3  libSystem.B.dylib 0x00007fff5fbfda60 _sigtramp + 3709217744
4  libstdc++.6.dylib 0x00007fff865ab5d2 __tcf_0 + 0
5  libstdc++.6.dylib 0x00007fff865a9ae1 __cxxabiv1::__terminate(void (*)()) +
11
6  libstdc++.6.dylib 0x00007fff865a9b16 __cxxabiv1::__unexpected(void (*)()) +
0
7  libstdc++.6.dylib 0x00007fff865a9bfc
__gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) + 0
8  libstdc++.6.dylib 0x00007fff865a9efb operator new(unsigned long) + 87
9  opt               0x000000010005629c
llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) + 76
10 opt               0x000000010027d852
llvm::SmallVectorTemplateBase<llvm::BasicBlock*, true>::grow(unsigned long) +
42
11 opt               0x00000001000eee6e void
llvm::SmallVectorImpl<llvm::BasicBlock*>::append<__gnu_cxx::__normal_iterator<llvm::BasicBlock*
const*, std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >
>(__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >,
__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >) + 108
12 opt               0x00000001000eeee3 llvm::SmallVector<llvm::BasicBlock*,
128u>::SmallVector<__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >
>(__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >,
__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > >) + 51
13 opt               0x00000001000eef73 llvm::LoopBase<llvm::BasicBlock,
llvm::Loop>::getExitingBlocks(llvm::SmallVectorImpl<llvm::BasicBlock*>&) const
+ 87
14 opt               0x00000001002b2e15
llvm::ScalarEvolution::ComputeBackedgeTakenCount(llvm::Loop const*) + 67
15 opt               0x00000001002b3115
llvm::ScalarEvolution::getBackedgeTakenInfo(llvm::Loop const*) + 231
16 opt               0x00000001002b7ceb
llvm::ScalarEvolution::getBackedgeTakenCount(llvm::Loop const*) + 29
17 opt               0x00000001002b89b5
llvm::ScalarEvolution::computeSCEVAtScope(llvm::SCEV const*, llvm::Loop const*)
+ 2573
18 opt               0x00000001002b8d50
llvm::ScalarEvolution::getSCEVAtScope(llvm::SCEV const*, llvm::Loop const*) +
214
19 opt               0x00000001002b93f5
llvm::ScalarEvolution::getSCEVAtScope(llvm::Value*, llvm::Loop const*) + 49
20 opt               0x00000001000da225 (anonymous
namespace)::IndVarSimplify::RewriteLoopExitValues(llvm::Loop*, llvm::SCEV
const*, llvm::SCEVExpander&) + 593
21 opt               0x00000001000daa11 (anonymous
namespace)::IndVarSimplify::runOnLoop(llvm::Loop*, llvm::LPPassManager&) + 279
22 opt               0x000000010026cc13
llvm::LPPassManager::runOnFunction(llvm::Function&) + 875
23 opt               0x00000001003c6c6e
llvm::FPPassManager::runOnFunction(llvm::Function&) + 336
24 opt               0x0000000100224414 (anonymous
namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*,
std::vector<llvm::CallGraphNode*, std::allocator<llvm::CallGraphNode*> >&,
llvm::CallGraph&, bool&) + 494
25 opt               0x0000000100224733 (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) + 563
26 opt               0x00000001003c695a
llvm::MPPassManager::runOnModule(llvm::Module&) + 372
27 opt               0x00000001003c87ef
llvm::PassManagerImpl::run(llvm::Module&) + 111
28 opt               0x00000001003c8851 llvm::PassManager::run(llvm::Module&) +
33
29 opt               0x00000001000651b7 main + 3082
30 opt               0x000000010005b138 start + 52
Stack dump:
0.      Program arguments: opt bugpoint-reduced-simplified.bc -inline
-scalarrepl -loop-rotate -instcombine -scalar-evolution -indvars -loop-deletion
-verify 
1.      Running pass 'CallGraph Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2.      Running pass 'Loop Pass Manager' on function
'@CRYPT_FormatAltNameEntry'
3.      Running pass 'Canonicalize Induction Variables' on basic block
'%for.body'
Abort trap


-- 
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