Sebastian Schlunke
2010-Mar-19 14:11 UTC
[LLVMdev] Use of blockadress() crashes llc in some cases
Hi! In some cases the use of blockaddress() crashes llc. I've attached two test-cases, one that crashes and for reference a slightly modified one (just 2 lines are commented) that works. I compile the files with # llvm-as test_crash.ll -o - | llc -f -o temp.s - and get 0 llc 0x0000000000c6ab6f 1 llc 0x0000000000c6b38d 2 libpthread.so.0 0x00007feccd2270f0 3 llc 0x00000000009a270f llvm::DenseMap<llvm::AssertingVH<llvm::BasicBlock>, llvm::MMIAddrLabelMap::AddrLabelSymEntry, llvm::DenseMapInfo<llvm::AssertingVH<llvm::BasicBlock> >, llvm::DenseMapInfo<llvm::MMIAddrLabelMap::AddrLabelSymEntry> >::operator[](llvm::AssertingVH<llvm::BasicBlock> const&) + 31 4 llc 0x000000000099f5d0 llvm::MMIAddrLabelMap::UpdateForRAUWBlock(llvm::BasicBlock*, llvm::BasicBlock*) + 64 5 llc 0x0000000000c10c9a llvm::ValueHandleBase::ValueIsRAUWd(llvm::Value*, llvm::Value*) + 442 6 llc 0x0000000000c11115 llvm::Value::uncheckedReplaceAllUsesWith(llvm::Value*) + 261 7 llc 0x0000000000ac86da llvm::MergeBasicBlockIntoOnlyPred(llvm::BasicBlock*, llvm::Pass*) + 186 8 llc 0x0000000000a8780f 9 llc 0x0000000000a8830b 10 llc 0x0000000000a89cd6 11 llc 0x0000000000bfdf16 llvm::FPPassManager::runOnFunction(llvm::Function&) + 534 12 llc 0x0000000000bfe0f1 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 129 13 llc 0x0000000000bfe31e llvm::FunctionPassManager::run(llvm::Function&) + 110 14 llc 0x000000000052d334 main + 3556 15 libc.so.6 0x00007feccc311a3d __libc_start_main + 253 16 llc 0x000000000052b039 Stack dump: 0. Program arguments: llc -f -o temp.s - 1. Running pass 'Optimize for code generation' on function '@reduce_graph' Segmentation fault I'm using the svn-version, revision 98581. Regards, Sebastian -------------- next part -------------- A non-text attachment was scrubbed... Name: test_working.ll Type: text/assembler-file Size: 422 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100319/997b1809/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: test_crash.ll Type: text/assembler-file Size: 420 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100319/997b1809/attachment-0001.bin>
Daniel Dunbar
2010-Mar-20 02:20 UTC
[LLVMdev] Use of blockadress() crashes llc in some cases
Hi Sebastian, It's probably best to just go ahead and file a bug in the LLVM bugzilla for this. - Daniel On Fri, Mar 19, 2010 at 7:11 AM, Sebastian Schlunke <schlunki at cs.tu-berlin.de> wrote:> Hi! > > In some cases the use of blockaddress() crashes llc. > > I've attached two test-cases, one that crashes and for reference a slightly modified one (just 2 lines are commented) that works. > > I compile the files with > # llvm-as test_crash.ll -o - | llc -f -o temp.s - > > and get > > 0 llc 0x0000000000c6ab6f > 1 llc 0x0000000000c6b38d > 2 libpthread.so.0 0x00007feccd2270f0 > 3 llc 0x00000000009a270f llvm::DenseMap<llvm::AssertingVH<llvm::BasicBlock>, llvm::MMIAddrLabelMap::AddrLabelSymEntry, llvm::DenseMapInfo<llvm::AssertingVH<llvm::BasicBlock> >, llvm::DenseMapInfo<llvm::MMIAddrLabelMap::AddrLabelSymEntry> >::operator[](llvm::AssertingVH<llvm::BasicBlock> const&) + 31 > 4 llc 0x000000000099f5d0 llvm::MMIAddrLabelMap::UpdateForRAUWBlock(llvm::BasicBlock*, llvm::BasicBlock*) + 64 > 5 llc 0x0000000000c10c9a llvm::ValueHandleBase::ValueIsRAUWd(llvm::Value*, llvm::Value*) + 442 > 6 llc 0x0000000000c11115 llvm::Value::uncheckedReplaceAllUsesWith(llvm::Value*) + 261 > 7 llc 0x0000000000ac86da llvm::MergeBasicBlockIntoOnlyPred(llvm::BasicBlock*, llvm::Pass*) + 186 > 8 llc 0x0000000000a8780f > 9 llc 0x0000000000a8830b > 10 llc 0x0000000000a89cd6 > 11 llc 0x0000000000bfdf16 llvm::FPPassManager::runOnFunction(llvm::Function&) + 534 > 12 llc 0x0000000000bfe0f1 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 129 > 13 llc 0x0000000000bfe31e llvm::FunctionPassManager::run(llvm::Function&) + 110 > 14 llc 0x000000000052d334 main + 3556 > 15 libc.so.6 0x00007feccc311a3d __libc_start_main + 253 > 16 llc 0x000000000052b039 > Stack dump: > 0. Program arguments: llc -f -o temp.s - > 1. Running pass 'Optimize for code generation' on function '@reduce_graph' > Segmentation fault > > I'm using the svn-version, revision 98581. > > Regards, > Sebastian > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Chris Lattner
2010-Mar-26 23:20 UTC
[LLVMdev] Use of blockadress() crashes llc in some cases
On Mar 19, 2010, at 7:11 AM, Sebastian Schlunke wrote:> Hi! > > In some cases the use of blockaddress() crashes llc. > > I've attached two test-cases, one that crashes and for reference a slightly modified one (just 2 lines are commented) that works.This works for me with mainline now, I think I fixed a similar bug recently. In general, please file bugs against bugzilla, it is easier to track than in email. Thanks! -Chris> > I compile the files with > # llvm-as test_crash.ll -o - | llc -f -o temp.s - > > and get > > 0 llc 0x0000000000c6ab6f > 1 llc 0x0000000000c6b38d > 2 libpthread.so.0 0x00007feccd2270f0 > 3 llc 0x00000000009a270f llvm::DenseMap<llvm::AssertingVH<llvm::BasicBlock>, llvm::MMIAddrLabelMap::AddrLabelSymEntry, llvm::DenseMapInfo<llvm::AssertingVH<llvm::BasicBlock> >, llvm::DenseMapInfo<llvm::MMIAddrLabelMap::AddrLabelSymEntry> >::operator[](llvm::AssertingVH<llvm::BasicBlock> const&) + 31 > 4 llc 0x000000000099f5d0 llvm::MMIAddrLabelMap::UpdateForRAUWBlock(llvm::BasicBlock*, llvm::BasicBlock*) + 64 > 5 llc 0x0000000000c10c9a llvm::ValueHandleBase::ValueIsRAUWd(llvm::Value*, llvm::Value*) + 442 > 6 llc 0x0000000000c11115 llvm::Value::uncheckedReplaceAllUsesWith(llvm::Value*) + 261 > 7 llc 0x0000000000ac86da llvm::MergeBasicBlockIntoOnlyPred(llvm::BasicBlock*, llvm::Pass*) + 186 > 8 llc 0x0000000000a8780f > 9 llc 0x0000000000a8830b > 10 llc 0x0000000000a89cd6 > 11 llc 0x0000000000bfdf16 llvm::FPPassManager::runOnFunction(llvm::Function&) + 534 > 12 llc 0x0000000000bfe0f1 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 129 > 13 llc 0x0000000000bfe31e llvm::FunctionPassManager::run(llvm::Function&) + 110 > 14 llc 0x000000000052d334 main + 3556 > 15 libc.so.6 0x00007feccc311a3d __libc_start_main + 253 > 16 llc 0x000000000052b039 > Stack dump: > 0. Program arguments: llc -f -o temp.s - > 1. Running pass 'Optimize for code generation' on function '@reduce_graph' > Segmentation fault > > I'm using the svn-version, revision 98581. > > Regards, > Sebastian > <test_working.ll><test_crash.ll>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev