<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - llc segfauls with split DWARF"
   href="https://bugs.llvm.org/show_bug.cgi?id=37164">37164</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llc segfauls with split DWARF
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jdevlieghere@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On Darwin, llc doesn't know how to deal with split DWARF. Currently this leads
to llc segfaulting when passing it a DWO file (-split-dwarf-file).

Reproducer:

llc -split-dwarf-file=foo.dwo -filetype=obj
llvm/test/DebugInfo/Generic/debug-names-one-cu.ll

Stack-trace:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x8)
  * frame #0: 0x0000000100eb058a llc`llvm::DwarfDebug::finalizeModuleInfo()
[inlined] llvm::MCSection::getBeginSymbol(this=0x0000000000000000) at
MCSection.h:106 [opt]
    frame #1: 0x0000000100eb058a
llc`llvm::DwarfDebug::finalizeModuleInfo(this=<unavailable>) at
DwarfDebug.cpp:748 [opt]
    frame #2: 0x0000000100eb0964
llc`llvm::DwarfDebug::endModule(this=0x000000010600d400) at DwarfDebug.cpp:809
[opt]
    frame #3: 0x0000000100e89c3d
llc`llvm::AsmPrinter::doFinalization(this=<unavailable>, M=<unavailable>) at
AsmPrinter.cpp:1370 [opt]
    frame #4: 0x000000010130e670
llc`llvm::FPPassManager::doFinalization(this=0x0000000103f17340,
M=0x0000000103f12940) at LegacyPassManager.cpp:1559 [opt]
    frame #5: 0x000000010130ebbd
llc`llvm::legacy::PassManagerImpl::run(llvm::Module&) at
LegacyPassManager.cpp:1615 [opt]
    frame #6: 0x000000010130e8a8
llc`llvm::legacy::PassManagerImpl::run(this=0x000000010501a400,
M=0x0000000103f12940) at LegacyPassManager.cpp:1700 [opt]
    frame #7: 0x0000000100005c42 llc`compileModule(argv=0x0000000000000000,
Context=0x00007ffeefbfeea0) at llc.cpp:572 [opt]
    frame #8: 0x000000010000317f llc`main(argc=<unavailable>,
argv=<unavailable>) at llc.cpp:345 [opt]
    frame #9: 0x00007fff6266b015 libdyld.dylib`start + 1</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>