<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 - lld-link crashes when handed an empty .res file (empty except for the "this is a 32-bit res file" header)"
   href="https://bugs.llvm.org/show_bug.cgi?id=34051">34051</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld-link crashes when handed an empty .res file (empty except for the "this is a 32-bit res file" header)
          </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>Linux
          </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>nicolasweber@gmx.de
          </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=18902" name="attach_18902" title="empty.res">attachment 18902</a> <a href="attachment.cgi?id=18902&action=edit" title="empty.res">[details]</a></span>
empty.res

thakis@thakis:~/src/chrome/src$ xxd empty.res
00000000: 0000 0000 2000 0000 ffff 0000 ffff 0000  .... ...........
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
thakis@thakis:~/src/chrome/src$
third_party/llvm-build/Release+Asserts/bin/lld-link empty.res
third_party/llvm-build/Release+Asserts/bin/lld-link: warning: /machine is not
specified. x64 is assumed
Program aborted due to an unhandled Error:
Stream Error: The stream is too short to perform the requested operation.
#0 0x0000000001a96c06 _ZL28PrintStackTraceSignalHandlerPv.llvm.74D59CD1
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1a96c06)
#1 0x0000000001a970d6 SignalHandler(int)
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1a970d6)
#2 0x00007f2540ff5330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f253f87dc37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f253f881028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#5 0x0000000001a4da54 llvm::Error::assertIsChecked()
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1a4da54)
#6 0x0000000003a3c0d1
llvm::object::WindowsResourceParser::parse(llvm::object::WindowsResource*)
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x3a3c0d1)
#7 0x0000000001ade912
lld::coff::convertResToCOFF(std::vector<llvm::MemoryBufferRef,
std::allocator<llvm::MemoryBufferRef> > const&)
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1ade912)
#8 0x0000000001abe1d9 lld::coff::LinkerDriver::link(llvm::ArrayRef<char
const*>) (third_party/llvm-build/Release+Asserts/bin/lld-link+0x1abe1d9)
#9 0x0000000001ab786f lld::coff::link(llvm::ArrayRef<char const*>,
llvm::raw_ostream&)
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1ab786f)
#10 0x0000000001a39d6f main
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1a39d6f)
#11 0x00007f253f868f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#12 0x0000000001a1f029 _start
(third_party/llvm-build/Release+Asserts/bin/lld-link+0x1a1f029)
Stack dump:
0.      Program arguments: third_party/llvm-build/Release+Asserts/bin/lld-link
empty.res 
Aborted (core dumped)</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>