[PATCH] D122372: [lld][COFF] Fix TypeServerSource lookup on GUID collisions
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 19:29:20 PDT 2022
aganea added a comment.
In D122372#3411508 <https://reviews.llvm.org/D122372#3411508>, @thieta wrote:
> The inputs are a bit big - but I am unsure on how to trim them down efficiently.
Not sure we need to add new files, the following repro triggers the crash, with existing files in the monorepo:
> yaml2obj.exe -o=a.obj lld\test\COFF\Inputs\pdb-type-server-simple-a.yaml
> sed -e s/ts.pdb/bs.pdb/ lld\test\COFF\Inputs\pdb-type-server-simple-b.yaml | yaml2obj.exe > b.obj
> llvm-pdbutil.exe yaml2pdb lld\test\COFF\Inputs\pdb-type-server-simple-ts.yaml -pdb ts.pdb
> sed -e s/{41414141-4141-4141-4141-414141414141}/{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}/ lld\test\COFF\Inputs\pdb-type-server-simple-ts.yaml > bs.yaml
> llvm-pdbutil.exe yaml2pdb bs.yaml -pdb bs.pdb
> lld-link.exe a.obj b.obj /debug
(crash)
You can probably do the same for the "valid" testcase? I suppose you can also play with `/debug:noghash` and `/debug:ghash` (default value) to cover both cases (with and without parallel type merging).
================
Comment at: lld/COFF/DebugTypes.cpp:71
+ TypeServerSource *tSrc = (TypeServerSource *)it.first->second;
+ warn("GUID collision between " + file.getFilePath() + " and " +
+ tSrc->pdbInputFile->session->getPDBFile().getFilePath());
----------------
Since the issue is in system libs, I wonder if we can detect that and only warn on non-system PDBs? MSVC link.exe doesn't warn. How many warnings do you actually get when linking a production executable?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122372/new/
https://reviews.llvm.org/D122372
More information about the llvm-commits
mailing list