<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Segfault in SelectionDAG.cpp getMemsetStringVal()"
   href="http://llvm.org/bugs/show_bug.cgi?id=16440">16440</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Segfault in SelectionDAG.cpp getMemsetStringVal()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andrew.macp@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>