[LLVMbugs] [Bug 11400] New: Loop::isLCSSAForm crashes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Nov 18 10:06:03 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11400
Bug #: 11400
Summary: Loop::isLCSSAForm crashes
Product: libraries
Version: 2.9
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Global Analyses
AssignedTo: unassignedbugs at nondot.org
ReportedBy: wujingyue at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7626
--> http://llvm.org/bugs/attachment.cgi?id=7626
a pass that causes the crash
Hi,
I got a segmentation fault when running the attached pass. I did compile LLVM
with debug+asserts, but I didn't see any assertion failure before the crash.
dumped stack:
0 opt 0x0000000000d895c2
1 opt 0x0000000000d893be
2 libpthread.so.0 0x00007f4fa6aa7060
3 opt 0x0000000000b1ef44 void llvm::SmallPtrSet<llvm::BasicBlock*,
16u>::insert<__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*> > >) + 34
4 opt 0x0000000000b1e80b llvm::SmallPtrSet<llvm::BasicBlock*,
16u>::SmallPtrSet<__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*> > >) + 71
5 opt 0x0000000000b1d879
llvm::Loop::isLCSSAForm(llvm::DominatorTree&) const + 83
6 misc.so 0x00007f4fa5b4f2d7
slicer::IdentifyLoops::process(llvm::Loop*, llvm::Function*) + 71
7 misc.so 0x00007f4fa5b4f3d3
slicer::IdentifyLoops::runOnModule(llvm::Module&) + 211
8 opt 0x0000000000d0aa40
llvm::MPPassManager::runOnModule(llvm::Module&) + 456
9 opt 0x0000000000d0af37 llvm::PassManagerImpl::run(llvm::Module&)
+ 125
10 opt 0x0000000000d0b33f llvm::PassManager::run(llvm::Module&) +
39
11 opt 0x00000000008c242a main + 4339
12 libc.so.6 0x00007f4fa5d7430d __libc_start_main + 237
13 opt 0x00000000008b3089
Stack dump:
0. Program arguments: opt -load
/home/jingyue/Research/llvm/install/lib/misc.so -identify-loops -disable-output
1. Running pass 'Identify loops' on module '<stdin>'.
Segmentation fault
Attaching GDB shows more detailed info:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000b1ef44 in llvm::SmallPtrSet<llvm::BasicBlock*,
16u>::insert<__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > > >
(this=0x7fffffffd570, I=..., E=...)
at /home/jingyue/Research/llvm/llvm-2.9/include/llvm/ADT/SmallPtrSet.h:270
270 insert(*I);
(gdb) bt
#0 0x0000000000b1ef44 in llvm::SmallPtrSet<llvm::BasicBlock*,
16u>::insert<__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > > >
(this=0x7fffffffd570, I=..., E=...)
at /home/jingyue/Research/llvm/llvm-2.9/include/llvm/ADT/SmallPtrSet.h:270
#1 0x0000000000b1e80b in llvm::SmallPtrSet<llvm::BasicBlock*,
16u>::SmallPtrSet<__gnu_cxx::__normal_iterator<llvm::BasicBlock* const*,
std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > > >
(this=0x7fffffffd570, I=..., E=...)
at /home/jingyue/Research/llvm/llvm-2.9/include/llvm/ADT/SmallPtrSet.h:247
#2 0x0000000000b1d879 in llvm::Loop::isLCSSAForm (this=0x13492c0, DT=...)
at LoopInfo.cpp:261
#3 0x00007ffff6c772d7 in slicer::IdentifyLoops::process (this=0x134fa10,
l=0x13492c0, f=0x133c660) at identify-loops.cpp:42
#4 0x00007ffff6c773d3 in slicer::IdentifyLoops::runOnModule (this=0x134fa10,
M=...)
at identify-loops.cpp:52
#5 0x0000000000d0aa40 in llvm::MPPassManager::runOnModule (this=0x1337630,
M=...)
at PassManager.cpp:1557
#6 0x0000000000d0af37 in llvm::PassManagerImpl::run (this=0x13403b0, M=...)
at PassManager.cpp:1640
#7 0x0000000000d0b33f in llvm::PassManager::run (this=0x7fffffffd930, M=...)
at PassManager.cpp:1684
#8 0x00000000008c242a in main (argc=5, argv=0x7fffffffdb38) at opt.cpp:689
What's more interesting is that the pass runs fine if I remove Line 41 (in
Function process):
DT = &getAnalysis<DominatorTree>(*f);
I tried diagnosing this issue more, but didn't get anything more useful due to
my superficial knowledge on LLVM. It would be great if you could take a look.
Thanks much.
Best,
Jingyue
--
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