[LLVMbugs] [Bug 8445] New: SimplifyCFG crashes with BB containing single unwind instruction

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 22 18:36:49 PDT 2010


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

           Summary: SimplifyCFG crashes with BB containing single unwind
                    instruction
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: alexmac at adobe.com
                CC: llvmbugs at cs.uiuc.edu


running "opt -simplifycfg" on the following function (tested with r117191):

-----------------------------------------
define void @test() {
    unwind
}
-----------------------------------------

Crashes with the following message:

0  opt               0x000000010046ede7 PrintStackTrace(void*) + 38
1  opt               0x000000010046f2ee SignalHandler(int) + 254
2  libSystem.B.dylib 0x00007fff82b8935a _sigtramp + 26
3  libSystem.B.dylib 0x00000001016055f0 _sigtramp + 2124923568
4  opt               0x000000010004e1dd llvm::Instruction::getOpcode() const +
21
5  opt               0x000000010004e379
llvm::CallInst::classof(llvm::Instruction const*) + 21
6  opt               0x0000000100020151 llvm::isa_impl<llvm::CallInst,
llvm::Instruction>::doit(llvm::Instruction const&) + 21
7  opt               0x000000010000c325 llvm::isa_impl_wrap<llvm::CallInst,
llvm::Instruction const, llvm::Instruction const>::doit(llvm::Instruction
const&) + 21
8  opt               0x000000010002016d bool
llvm::isa_impl_cl<llvm::Instruction>::isa<llvm::CallInst>(llvm::Instruction
const&) + 21
9  opt               0x00000001000c35b1 bool
llvm::isa_impl_cl<llvm::Instruction*>::isa<llvm::CallInst>(llvm::Instruction*)
+ 21
10 opt               0x00000001001302c0 bool
llvm::isa_impl_cl<llvm::Instruction*
const>::isa<llvm::CallInst>(llvm::Instruction* const&) + 24
11 opt               0x000000010014d030 llvm::isa_impl_wrap<llvm::CallInst,
llvm::ilist_iterator<llvm::Instruction> const,
llvm::Instruction*>::doit(llvm::ilist_iterator<llvm::Instruction> const&) + 34
12 opt               0x00000001001302db bool
llvm::isa_impl_cl<llvm::ilist_iterator<llvm::Instruction>
>::isa<llvm::CallInst>(llvm::ilist_iterator<llvm::Instruction> const&) + 21
13 opt               0x00000001001302f5 bool llvm::isa<llvm::CallInst,
llvm::ilist_iterator<llvm::Instruction>
>(llvm::ilist_iterator<llvm::Instruction> const&) + 21
14 opt               0x0000000100093f17 llvm::cast_retty<llvm::CallInst,
llvm::ilist_iterator<llvm::Instruction> >::ret_type
llvm::dyn_cast<llvm::CallInst, llvm::ilist_iterator<llvm::Instruction>
>(llvm::ilist_iterator<llvm::Instruction> const&) + 21
15 opt               0x000000010013ada0 MarkAliveBlocks(llvm::BasicBlock*,
llvm::SmallPtrSet<llvm::BasicBlock*, 128u>&) + 156
16 opt               0x000000010013b008
RemoveUnreachableBlocksFromFn(llvm::Function&) + 71
17 opt               0x000000010013b337 (anonymous
namespace)::CFGSimplifyPass::runOnFunction(llvm::Function&) + 127
18 opt               0x000000010040508e
llvm::FPPassManager::runOnFunction(llvm::Function&) + 350
19 opt               0x0000000100405261
llvm::FPPassManager::runOnModule(llvm::Module&) + 81
20 opt               0x0000000100404d5e
llvm::MPPassManager::runOnModule(llvm::Module&) + 384
21 opt               0x000000010040650f
llvm::PassManagerImpl::run(llvm::Module&) + 111
22 opt               0x0000000100406571 llvm::PassManager::run(llvm::Module&) +
33
23 opt               0x000000010006a903 main + 3679
24 opt               0x000000010005f848 start + 52
Stack dump:
0.    Program arguments: ./Debug+Asserts/bin/opt -simplifycfg test.bc -o
test-opt.bc 
1.    Running pass 'Function Pass Manager' on module 'test.bc'.
2.    Running pass 'Simplify the CFG' on function '@test'
Segmentation fault

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