[LLVMbugs] [Bug 24249] New: Codegen crash when compiling recent Clang sources using Clang/LLVM release_34

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 24 11:04:34 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24249

            Bug ID: 24249
           Summary: Codegen crash when compiling recent Clang sources
                    using Clang/LLVM release_34
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jonathan.robert.anderson at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 14641
  --> https://llvm.org/bugs/attachment.cgi?id=14641&action=edit
Reduced test case

I'm using Clang 3.4.1 (the default system compiler on FreeBSD 10.1) to compile
recent Clang sources. It seems to be choking on one of the MicrosoftCXXABI.cpp
files in the tree, causing a crash in code generation. I've attached a reduced
test case, which also causes a crash in an `llc` that I compiled from the
`release_34` branch.

When I run under GDB (sorry, LLDB support isn't great on FreeBSD 10), I get the
following backtrace:

llvm::SDNode::getOpcode (this=0x0) at SelectionDAGNodes.h:369
369       unsigned getOpcode()  const { return (unsigned short)NodeType; }
(gdb) bt
#0  llvm::SDNode::getOpcode (this=0x0) at SelectionDAGNodes.h:369
#1  0x0000000001245ffe in llvm::SelectionDAGISel::SelectCodeCommon (
    this=0x80e70ed40, NodeToMatch=0x810ee1110, 
    MatcherTable=0x39ccf90 "\026�h\220", TableSize=147443)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:2182
#2  0x0000000000d31a04 in (anonymous namespace)::X86DAGToDAGISel::SelectCode (
    this=0x80e70ed40, N=0x810ee1110) at X86GenDAGISel.inc:69739
#3  0x0000000000d2405b in (anonymous namespace)::X86DAGToDAGISel::Select (
    this=0x80e70ed40, Node=0x810ee1110)
    at /home/jon/LLVM/3.4.1/src/lib/Target/X86/X86ISelDAGToDAG.cpp:2772
#4  0x000000000123eac0 in llvm::SelectionDAGISel::DoInstructionSelection (
    this=0x80e70ed40)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:845
#5  0x000000000123e125 in llvm::SelectionDAGISel::CodeGenAndEmitDAG (
    this=0x80e70ed40)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:746
#6  0x000000000123d2b9 in llvm::SelectionDAGISel::SelectBasicBlock (
    this=0x80e70ed40, Begin=
      {<std::__1::iterator<std::__1::bidirectional_iterator_tag, const
llvm::Instruction, long, const llvm::Instruction *, const llvm::Instruction &>>
= {<No data fields>}, NodePtr = 0x8105392c8}, End=
      {<std::__1::iterator<std::__1::bidirectional_iterator_tag, const
llvm::Instruction, long, const llvm::Instruction *, const llvm::Instruction &>>
= {<No da
ta fields>}, NodePtr = 0x810a25b00}, HadTailCall=@0x7fffffffac9b)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:584
#7  0x000000000123d06d in llvm::SelectionDAGISel::SelectAllBasicBlocks (
    this=0x80e70ed40, Fn=@0x8108f5e20)
    at
/home/jon/LLVM/3.4.1/src/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1189
#8  0x000000000123b043 in llvm::SelectionDAGISel::runOnMachineFunction (
    this=0x80e70ed40, mf=@0x806444300)
#9  0x000000000148108e in llvm::MachineFunctionPass::runOnFunction (
    this=0x80e70ed40, F=@0x8108f5e20)
    at /home/jon/LLVM/3.4.1/src/lib/CodeGen/MachineFunctionPass.cpp:33
#10 0x0000000001be44bb in llvm::FPPassManager::runOnFunction (
    this=0x810cc3900, F=@0x8108f5e20)
    at /home/jon/LLVM/3.4.1/src/lib/IR/LegacyPassManager.cpp:1538
#11 0x0000000001be47c8 in llvm::FPPassManager::runOnModule (this=0x810cc3900, 
    M=@0x806430800)
[... etc ...]

The .bc file compiles flawlessly using `llc` from up-to-date LLVM.

-- 
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/20150724/929079d8/attachment.html>


More information about the llvm-bugs mailing list