[llvm-bugs] [Bug 50812] New: "Invalid symbol type" while parsing a valid framework archive

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 22 20:04:37 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50812

            Bug ID: 50812
           Summary: "Invalid symbol type" while parsing a valid framework
                    archive
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: vyng at google.com
                CC: gkm at fb.com, jezreel at gmail.com,
                    llvm-bugs at lists.llvm.org, smeenai at fb.com

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210623/d35475cd/attachment-0001.html>


More information about the llvm-bugs mailing list