<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 - "Invalid symbol type" while parsing a valid framework archive"
   href="https://bugs.llvm.org/show_bug.cgi?id=50812">50812</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"Invalid symbol type" while parsing a valid framework archive
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>MachO
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vyng@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Repro:
ld64.lld.darwinnew  -arch x86_64 -force_load Cronet 

This isn't expected to succeed, in fact, it should complain about a bunch of
undef symbols, but this is the easiest way to real the problem.

This would result in a crash "Invalid symbol type" on line[0] - the value of
`type` is 4.

I haven't done a lot of digging, but from a bit of initial inspection, it
seemed 111704 symbols (out of 340463) from this archive were seen to have this
invalid type. All of them are actually local symbols (ie., denoted with 't' by
llvm-nm)



-----------------------------

`Cronet` is produced from this package[1], which I'm attaching here for
convenience. You could also rebuild it yourself.

[0]
<a href="https://github.com/llvm/llvm-project/blob/e8c8ce0974edca7bc21ce53826ff7b2c0456d70a/lld/MachO/InputFiles.cpp#L570">https://github.com/llvm/llvm-project/blob/e8c8ce0974edca7bc21ce53826ff7b2c0456d70a/lld/MachO/InputFiles.cpp#L570</a>
[1]
<a href="https://chromium.googlesource.com/chromium/src/+/refs/heads/main/components/cronet/ios/BUILD.gn">https://chromium.googlesource.com/chromium/src/+/refs/heads/main/components/cronet/ios/BUILD.gn</a></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>