<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 - Misscalculated PE header value"
   href="https://bugs.llvm.org/show_bug.cgi?id=34949">34949</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Misscalculated PE header value
          </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>Windows NT
          </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>COFF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ege.balci@invictuseurope.com
          </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=19275" name="attach_19275" title="Miscalculated SizeOfImage value">attachment 19275</a> <a href="attachment.cgi?id=19275&action=edit" title="Miscalculated SizeOfImage value">[details]</a></span>
Miscalculated SizeOfImage value

Recently putty project (<a href="http://www.putty.org/">http://www.putty.org/</a>) switched to building with clang
and lld instead of Microsoft's toolchain. Their latest released PE 32 bit
binary (<a href="https://the.earth.li/~sgtatham/putty/latest/w32/putty.exe">https://the.earth.li/~sgtatham/putty/latest/w32/putty.exe</a>) seems to has
faulty SizeOfImage value on the PE header, if you check the actual size of the
PE image just after mapping it on the memory it does not add up to the header
value. This bug causes packers like UPX to crash while trying to parse the PE
file. I sent a email to the putty team and they sad it should be about the lld
linker.</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>