[LLVMbugs] [Bug 16440] New: Segfault in SelectionDAG.cpp getMemsetStringVal()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 25 03:38:06 PDT 2013


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

            Bug ID: 16440
           Summary: Segfault in SelectionDAG.cpp getMemsetStringVal()
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: andrew.macp at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

After upgrading to LLVM 3.3 we're getting this crash when trying to codegen a
function from a module that's been created via llvm::ParseBitcodeFile(). It
seems from the code that TTI may not always be set and thus should be checked
for NULL before being deref'd.

More info or further repro steps can be provided if needed.

#0  0x00007ffff514d117 in getMemsetStringVal (VT=..., dl=..., DAG=..., TLI=...,
Str=...)
    at SelectionDAG.cpp:3450
#1  0x00007ffff514e244 in getMemcpyLoadsAndStores (DAG=..., dl=..., Chain=...,
Dst=..., Src=..., Size=3, 
    Align=1, isVol=false, AlwaysInline=false, DstPtrInfo=..., SrcPtrInfo=...)
at SelectionDAG.cpp:3671
#2  0x00007ffff514ff48 in llvm::SelectionDAG::getMemcpy (this=0xf03b10,
Chain=..., dl=..., Dst=..., 
    Src=..., Size=..., Align=1, isVol=false, AlwaysInline=false,
DstPtrInfo=..., SrcPtrInfo=...)
    at SelectionDAG.cpp:3888
#3  0x00007ffff5194461 in llvm::SelectionDAGBuilder::visitIntrinsicCall
(this=0xf04200, I=..., 
    Intrinsic=1032) at SelectionDAGBuilder.cpp:4475
#4  0x00007ffff519d771 in llvm::SelectionDAGBuilder::visitCall (this=0xf04200,
I=...)
    at SelectionDAGBuilder.cpp:5548
#5  0x00007ffff51753d2 in llvm::SelectionDAGBuilder::visit (this=0xf04200,
Opcode=48, I=...)
    at
/home/andrew/Fabric/CreationPlatform/ThirdParty/Build/x86_64/Debug/llvm-3.3/include/llvm/IR/Instruction.def:164
#6  0x00007ffff5174e6c in llvm::SelectionDAGBuilder::visit (this=0xf04200,
I=...)
    at SelectionDAGBuilder.cpp:956
#7  0x00007ffff51c3560 in llvm::SelectionDAGISel::SelectBasicBlock
(this=0xf037d0, Begin=..., End=..., 
    HadTailCall=@0x7fffffffbb00: false) at SelectionDAGISel.cpp:517
#8  0x00007ffff51c5fc3 in llvm::SelectionDAGISel::SelectAllBasicBlocks
(this=0xf037d0, Fn=...)
    at SelectionDAGISel.cpp:1068
#9  0x00007ffff51c29ce in llvm::SelectionDAGISel::runOnMachineFunction
(this=0xf037d0, mf=...)
    at SelectionDAGISel.cpp:386
#10 0x00007ffff53ba571 in llvm::MachineFunctionPass::runOnFunction
(this=0xf037d0, F=...)
    at MachineFunctionPass.cpp:33
#11 0x00007ffff5921dc0 in llvm::FPPassManager::runOnFunction (this=0xeff470,
F=...)
    at PassManager.cpp:1530
#12 0x00007ffff5921fbb in llvm::FPPassManager::runOnModule (this=0xeff470,
M=...) at PassManager.cpp:1550
#13 0x00007ffff5922333 in llvm::MPPassManager::runOnModule (this=0xed48b0,
M=...) at PassManager.cpp:1608
#14 0x00007ffff5922948 in llvm::PassManagerImpl::run (this=0xf07520, M=...) at
PassManager.cpp:1703
#15 0x00007ffff5922b5b in llvm::PassManager::run (this=0x7fffffffc050, M=...)
at PassManager.cpp:1738
#16 0x00007ffff535f4cd in llvm::MCJIT::emitObject (this=0xbb10c0, m=0xcd6890)
at MCJIT.cpp:102
#17 0x00007ffff535f6aa in llvm::MCJIT::loadObject (this=0xbb10c0, M=0xcd6890)
at MCJIT.cpp:139
#18 0x00007ffff535f965 in llvm::MCJIT::getPointerToFunction (this=0xbb10c0,
F=0xbbb500) at MCJIT.cpp:196
#19 ... <our code>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130625/d2695fe3/attachment.html>


More information about the llvm-bugs mailing list