[llvm-bugs] [Bug 51383] New: Duplicate symbols in PDB public symbol stream

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 6 06:56:38 PDT 2021


            Bug ID: 51383
           Summary: Duplicate symbols in PDB public symbol stream
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: stefan.reinalter at molecular-matters.com
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com

I recently noticed that in certain cases, the PDB file produced by lld will
contain symbols twice in the public symbol stream.

Here's a short repro case:

#include <thread>

void Func(void) {}

int main(void)
  std::thread t(&Func);
  return 0;

Compile and link the above with clang-cl and lld-link, respectively.
Note that the PDB file will contain the symbol
??_Gbad_array_new_length at std@@UEAAPEAXI at Z twice in the public symbol stream.

I've noticed this with other symbols as well, but the above repro should be the
easiest to reproduce.

I have never seen any duplicate symbol in PDBs produced by MSVC, and the public
symbol stream is meant to contain only unique, external symbols with their RVA
and mangled name, so I don't think this is intentional. It might trip up some
tools working with PDB files, as it did Live++.

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/20210806/822c6956/attachment.html>

More information about the llvm-bugs mailing list