<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 - Crash when trying to find the source file/line for an undefined symbol, due to PendingComdat"
   href="https://bugs.llvm.org/show_bug.cgi?id=38183">38183</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when trying to find the source file/line for an undefined symbol, due to PendingComdat
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>COFF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>martin@martin.st
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20560" name="attach_20560" title="Repro test case">attachment 20560</a> <a href="attachment.cgi?id=20560&action=edit" title="Repro test case">[details]</a></span>
Repro test case

The attached repro case crashes with a backtrace like this:

Stack dump:
0.      Program arguments: lld-link @response.txt 
#0 0x00007f3ddff0345d llvm::sys::PrintStackTrace(llvm::raw_ostream&)
lib/Support/Unix/Signals.inc:490:0
#1 0x00007f3ddff034f0 PrintStackTraceSignalHandler(void*)
lib/Support/Unix/Signals.inc:554:0
#2 0x00007f3ddff0124c llvm::sys::RunSignalHandlers()
lib/Support/Signals.cpp:67:0
#3 0x00007f3ddff02e57 SignalHandler(int) lib/Support/Unix/Signals.inc:353:0
#4 0x00007f3ddeb4b4b0 (/lib/x86_64-linux-gnu/libc.so.6+0x354b0)
#5 0x00007f3ddfa76ada lld::coff::DefinedRegular::getChunk() const
tools/lld/COFF/Symbols.h:169:0
#6 0x00007f3ddfb29810 lld::coff::getSymbolName(lld::coff::SectionChunk*,
unsigned int) tools/lld/COFF/SymbolTable.cpp:77:0
#7 0x00007f3ddfb29a8a lld::coff::getSymbolLocations(lld::coff::ObjFile*,
unsigned int) tools/lld/COFF/SymbolTable.cpp:105:0
#8 0x00007f3ddfb2a6fd lld::coff::SymbolTable::reportRemainingUndefines()
tools/lld/COFF/SymbolTable.cpp:199:0
#9 0x00007f3ddfaa1295 lld::coff::LinkerDriver::link(llvm::ArrayRef<char
const*>) tools/lld/COFF/Driver.cpp:1474:0
#10 0x00007f3ddfa9359c lld::coff::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&)
tools/lld/COFF/Driver.cpp:75:0
#11 0x000000000040465a main tools/lld/tools/lld/lld.cpp:134:0
#12 0x00007f3ddeb36830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#13 0x00000000004029d9 _start (lld-link+0x4029d9)

In these cases, the DefinedRegular touched is referring to a SectionChunk that
actually is a PendingComdat which is a dummy SectionChunk.

I'm not quite familiar enough with the handling of PendingComdat to quickly see
how to best fix this.</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>