LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1431 - segfault with -sccp
Summary: segfault with -sccp
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: Other Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 05:03 PDT by Duncan Sands
Modified: 2010-02-22 12:53 PST (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
testcase .ll (1.77 KB, text/plain)
2007-05-17 05:04 PDT, Duncan Sands
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2007-05-17 05:03:33 PDT
$ opt -sccp tc.bc

opt((anonymous namespace)::PrintStackTrace()+0x1a)[0x8650486]
opt((anonymous namespace)::SignalHandler(int)+0x112)[0x865074c]
[0xffffe420]
opt(llvm::DominatorTree::DFSPass(llvm::BasicBlock*, 
llvm::DominatorTreeBase::InfoRec&, unsigned int)+0xf5)[0x85b0fdf]
opt(llvm::DominatorTree::calculate(llvm::Function&)+0x108)[0x85b11c6]
opt(llvm::DominatorTree::runOnFunction(llvm::Function&)+0x46)[0x85b1692]
opt(llvm::FPPassManager::runOnFunction(llvm::Function&)+0x13a)[0x85eb2bc]
opt(llvm::FPPassManager::runOnModule(llvm::Module&)+0x6e)[0x85eb484]
opt(llvm::MPPassManager::runOnModule(llvm::Module&)+0x11d)[0x85eaf5d]
opt(llvm::PassManagerImpl::run(llvm::Module&)+0x6e)[0x85eb12a]
opt(llvm::PassManager::run(llvm::Module&)+0x1a)[0x85eb17c]
opt(main+0xa10)[0x8388296]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7cc0ebc]
opt(realloc+0x7d)[0x837a4c1]
Segmentation fault (core dumped)
Comment 1 Duncan Sands 2007-05-17 05:04:21 PDT
Created attachment 855 [details]
testcase .ll
Comment 2 Anton Korobeynikov 2007-05-17 05:10:40 PDT
Valgrinding:

==15305==  Access not within mapped region at address 0x0
==15305==    at 0x836F795: llvm::TerminatorInst::getNumSuccessors() const
(InstrTypes.h:56)
==15305==    by 0x8579393: llvm::DominatorTree::DFSPass(llvm::BasicBlock*,
llvm::DominatorTreeBase::InfoRec&, unsigned) (Dominators.cpp:106)
==15305==    by 0x8579788: llvm::DominatorTree::calculate(llvm::Function&)
(Dominators.cpp:244)
==15305==    by 0x857A0A3: llvm::DominatorTree::runOnFunction(llvm::Function&)
(Dominators.cpp:369)
==15305==    by 0x85AE9C1: llvm::FPPassManager::runOnFunction(llvm::Function&)
(PassManager.cpp:1145)
==15305==    by 0x85AEB71: llvm::FPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1164)
==15305==    by 0x85AECE1: llvm::MPPassManager::runOnModule(llvm::Module&)
(PassManager.cpp:1213)
==15305==    by 0x85AF0CD: llvm::PassManagerImpl::run(llvm::Module&)
(PassManager.cpp:1286)
==15305==    by 0x85AF239: llvm::PassManager::run(llvm::Module&)
(PassManager.cpp:1318)
==15305==    by 0x8377A85: main (opt.cpp:366)
Comment 3 Anton Korobeynikov 2007-05-17 05:12:58 PDT
Segfault is caused by first invoke.