llvm-project/lld/test/COFF/Inputs
Tobias Hieta 98bc304e9f [lld][COFF] Fix TypeServerSource lookup on GUID collisions
Microsoft shipped a bunch of PDB files with broken/invalid GUIDs
which lead lld to use 0xFF as the key for these files in an internal
cache. When multiple files have this key it will lead to collisions
and confused symbol lookup.

Several approaches to fix this was considered. Including making the key
the path to the PDB file, but this requires some filesystem operations
in order to normalize the file path.

Since this only happens with malformatted PDB files and we haven't
seen this before they malformatted files where shipped with visual
studio we probably shouldn't optimize for this use-case.

Instead we now just don't insert files with Guid == 0xFF into the
cache map and warn if we get collisions so similar problems can be
found in the future instead of being silent.

Discussion about the root issue and the approach to this fix can be found on Github: https://github.com/llvm/llvm-project/issues/54487

Reviewed By: aganea

Differential Revision: https://reviews.llvm.org/D122372
2022-04-02 10:09:07 +02:00
..
precompa [PDB] Fix bug when using multiple PCH header objects with the same name. 2019-10-10 20:25:51 +00:00
precompb [PDB] Fix bug when using multiple PCH header objects with the same name. 2019-10-10 20:25:51 +00:00
alias-implib.lib [COFF] Avoid loading objects for mingw autoimport, when a defined alias exists 2019-08-02 11:02:34 +00:00
alpha.ll
armnt-executable.obj.yaml
armnt-executable.s
associative-comdat-2.s
associative-comdat-mingw-2.s [COFF] Treat .xdata/.pdata$<sym> as implicitly associative to <sym> for MinGW 2018-08-06 21:26:09 +00:00
bad-block-size.pdb [LLD][COFF] Cleanup error messages / add more coverage tests 2018-09-10 13:51:21 +00:00
bar.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
beta.ll
cl-gl.obj
combined-resources-2.rc Delete trailing \r. NFC 2019-05-02 00:39:03 +00:00
combined-resources-2.res
combined-resources-2.yaml [LLD] [COFF] Support merging resource object files 2019-08-30 06:56:33 +00:00
combined-resources-cursor.bmp
combined-resources-okay.bmp
combined-resources.rc
combined-resources.res
combined-resources.yaml [LLD] [COFF] Support merging resource object files 2019-08-30 06:56:33 +00:00
comdat-binutils.yaml [LLD] [COFF] Check the aux section definition size for IMAGE_COMDAT_SELECT_SAME_SIZE 2020-08-27 15:08:57 +03:00
comdat-jumptable2.s [COFF] In MinGW mode, ignore relocations against a discarded section 2018-09-30 18:31:03 +00:00
comdat-llvm.yaml [LLD] [COFF] Check the aux section definition size for IMAGE_COMDAT_SELECT_SAME_SIZE 2020-08-27 15:08:57 +03:00
common-replacement.s [COFF] Remove a superfluous warning about aligncomm for non-common symbols 2018-08-06 19:49:18 +00:00
conflict.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
constant-export.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
constant-import.s
crt-dyn-initializer-order_1.yaml Delete trailing \r. NFC 2019-05-02 00:39:03 +00:00
crt-dyn-initializer-order_2.yaml Delete trailing \r. NFC 2019-05-02 00:39:03 +00:00
def-many.py [LLD] [COFF] Error out if creating a DLL with too many exported symbols 2020-08-31 21:15:13 +03:00
default.def
delayimports-error.yaml
delayimporttables-dll1.yaml [COFF] Fix delay import directory iterator 2019-04-04 14:13:28 +00:00
delayimporttables-dll2.yaml [COFF] Fix delay import directory iterator 2019-04-04 14:13:28 +00:00
eh_frame_terminator-crtend.s [COFF] Link crtend.o as the last object file 2019-04-15 10:57:44 +00:00
eh_frame_terminator-otherfunc.s [COFF] Link crtend.o as the last object file 2019-04-15 10:57:44 +00:00
empty.yaml lld-link: Implement support for %_PDB% and %_EXT% for /pdbaltpath:. 2018-10-08 23:06:05 +00:00
entry-mangled.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
except_handler3.lib
export.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
export.yaml
export2.yaml
extension.def
failmismatch1.ll [LLD][COFF] Attempt fix for failifmismatch test on aarch64-only builder. 2019-03-07 13:32:29 +00:00
failmismatch2.ll [LLD][COFF] Attempt fix for failifmismatch test on aarch64-only builder. 2019-03-07 13:32:29 +00:00
far-arm64-abs.s
gamma.ll
generic.yaml
globals-dia-func-collision3.obj [PDB] One more fix for hasing GSI records. 2018-07-06 21:01:42 +00:00
globals-dia-vfunc-collision.obj [PDB] Sort globals symbols by name in GSI hash buckets. 2018-07-06 02:33:58 +00:00
globals-dia-vfunc-collision2.obj [PDB] Sort globals symbols by name in GSI hash buckets. 2018-07-06 02:33:58 +00:00
globals-dia-vfunc-simple.obj [PDB] Sort globals symbols by name in GSI hash buckets. 2018-07-06 02:33:58 +00:00
gnu-implib-data.s [COFF] Allow automatic dllimport from gnu import libraries 2018-09-26 06:13:39 +00:00
gnu-implib-func.s [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
gnu-implib-head.s [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
gnu-implib-tail.s [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
gnu-weak.o [COFF] Cope with weak aliases produced by GNU tools 2018-10-03 18:31:53 +00:00
gnu-weak2.o [COFF] Cope with weak aliases produced by GNU tools 2018-10-03 18:31:53 +00:00
guardcf-align-foobar.yaml
hello32.yaml Fix linkrepro.test after safeseh:no change 2019-07-16 18:33:13 +00:00
hello64.asm
hello64.obj
icf-safe.s COFF: Implement safe ICF on rodata using address-significance tables. 2018-08-23 17:44:42 +00:00
id.res lld-link: Add /force:multipleres extension to make dupe resource diag non-fatal 2019-05-02 21:21:55 +00:00
id.res.o [COFF] Fix .rsrc sections with differing permissions 2019-06-28 17:13:52 +00:00
import.yaml
imports-mangle.lib
include1a.yaml
include1b.yaml
include1c.yaml
inline-weak.o [COFF] Cope with GCC produced weak aliases referring to comdat functions 2018-10-05 19:43:16 +00:00
inline-weak2.o [COFF] Cope with GCC produced weak aliases referring to comdat functions 2018-10-05 19:43:16 +00:00
libcall-archive.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
libcall-archive.s [COFF] Add libcall symbols to the link when LTO is being used 2019-08-22 19:40:07 +00:00
library-arm64.lib
library.def [LLD][COFF] Support GNU style == aliases 2022-01-19 14:22:13 +01:00
library.lib
library2-arm64.lib
library2.def
loadconfig-cfg-x64.s
locally-imported-def.s
locally-imported-imp.s
lto-cache.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-chkstk-chkstk.s
lto-chkstk-foo.s
lto-comdat1.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-comdat2.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-dep.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-lazy-reference-dummy.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
lto-lazy-reference-quadruple.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
machine-x64.yaml
machine-x86.yaml
mangled-symbol.s lld-link: Demangle symbols from archives in diagnostics 2019-07-19 13:29:10 +00:00
manifest-lang0.res [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifest-lang0.yaml [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifest-lang1.res [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifest-lang1.yaml [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifest-lang2.res [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifest-lang2.yaml [LLD] [COFF] Implement MinGW default manifest handling 2019-09-04 20:34:00 +00:00
manifestdependency-drectve.yaml [lld/COFF] Improve handling of the /manifestdependency: flag 2021-08-25 14:36:32 -04:00
manifestinput.test
map.yaml [lld-link] Support /map option, matching link.exe 's /map output format 2020-03-24 09:48:00 -04:00
msvclto-order-a.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
msvclto-order-b.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
msvclto.s
named.def
natvis-1.natvis
natvis-2.natvis
natvis-3.natvis
no-ipi-stream-obj.obj.yaml [lld] Fix type server merging with PDBs without IPI stream 2019-06-12 22:33:16 +00:00
no-ipi-stream-pdb.pdb.yaml [lld] Fix type server merging with PDBs without IPI stream 2019-06-12 22:33:16 +00:00
object.s
oldname.yaml
order.yaml
ordinal-only-implib.def [lld] Don't create hints-section if Hint/Name Table is empty 2019-10-09 06:48:24 +00:00
otherFunc.s [COFF] Store import symbol pointers as pointers to the base class 2018-07-10 10:40:11 +00:00
pdb-diff-cl.pdb
pdb-diff.cpp Delete trailing \r. NFC 2019-05-02 00:39:03 +00:00
pdb-diff.obj
pdb-file-statics-a.yaml [COFF] Fix relocation offsets in pdb-file-statics test input 2021-01-20 11:45:30 -08:00
pdb-file-statics-b.yaml [COFF] Update LLD yaml test cases to include .bss size 2019-05-10 22:12:51 +00:00
pdb-global-constants-a.s Deduplicate S_CONSTANTs in LLD. 2019-06-11 18:02:39 +00:00
pdb-global-constants-b.s Deduplicate S_CONSTANTs in LLD. 2019-06-11 18:02:39 +00:00
pdb-global-gc.s
pdb-globals.yaml [LLD][COFF] Move debug info for thread-local variables into PDB global stream 2020-05-06 15:23:58 -04:00
pdb-hashes-1.yaml
pdb-hashes-2-missing.yaml
pdb-hashes-2.yaml
pdb-import-gc.lib
pdb-scopes-a.yaml Update LLD tests for CodeView dumper change in r339907 2018-08-16 18:03:06 +00:00
pdb-scopes-b.yaml Update LLD tests for CodeView dumper change in r339907 2018-08-16 18:03:06 +00:00
pdb-type-server-guid-collision-a-pdb.yaml [lld][COFF] Fix TypeServerSource lookup on GUID collisions 2022-04-02 10:09:07 +02:00
pdb-type-server-guid-collision-a.yaml [lld][COFF] Fix TypeServerSource lookup on GUID collisions 2022-04-02 10:09:07 +02:00
pdb-type-server-guid-collision-b-pdb.yaml [lld][COFF] Fix TypeServerSource lookup on GUID collisions 2022-04-02 10:09:07 +02:00
pdb-type-server-guid-collision-b.yaml [lld][COFF] Fix TypeServerSource lookup on GUID collisions 2022-04-02 10:09:07 +02:00
pdb-type-server-invalid-path.yaml [lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right order. 2021-04-09 05:29:14 +04:00
pdb-type-server-missing-2.yaml [lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right order. 2021-04-09 05:29:14 +04:00
pdb-type-server-simple-a.yaml Update LLD tests for CodeView dumper change in r339907 2018-08-16 18:03:06 +00:00
pdb-type-server-simple-b.yaml Update LLD tests for CodeView dumper change in r339907 2018-08-16 18:03:06 +00:00
pdb-type-server-simple-ts.yaml
pdb-type-server-valid-signature.yaml [lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right order. 2021-04-09 05:29:14 +04:00
pdb1.yaml
pdb2.yaml
pdb_comdat_bar.yaml [COFF] Update LLD yaml test cases to include .bss size 2019-05-10 22:12:51 +00:00
pdb_comdat_main.yaml
pdb_lines_1.yaml
pdb_lines_1_relative.yaml Re-land [CodeView] Add full repro to LF_BUILDINFO record 2022-01-19 19:44:37 -05:00
pdb_lines_2.yaml
pdb_lines_2_relative.yaml Re-land [CodeView] Add full repro to LF_BUILDINFO record 2022-01-19 19:44:37 -05:00
precomp-a.obj [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
precomp-b.obj [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
precomp-ghash-obj1.obj [LLD][COFF] When using PCH.OBJ, ensure func_id records indices are remapped under /DEBUG:GHASH 2021-01-07 17:27:13 -05:00
precomp-ghash-obj2.obj [LLD][COFF] When using PCH.OBJ, ensure func_id records indices are remapped under /DEBUG:GHASH 2021-01-07 17:27:13 -05:00
precomp-ghash-precomp.obj [LLD][COFF] When using PCH.OBJ, ensure func_id records indices are remapped under /DEBUG:GHASH 2021-01-07 17:27:13 -05:00
precomp-invalid.obj [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
precomp.obj [COFF][LLD] Add link support for Microsoft precompiled headers OBJs 2018-11-05 19:20:47 +00:00
precomp2-a.yaml [LLD][COFF] Fix crash with /summary and PCH input files 2020-10-01 17:08:35 -04:00
precomp2.yaml [LLD][COFF] Fix crash with /summary and PCH input files 2020-10-01 17:08:35 -04:00
resource.res
ret42.lib
ret42.obj
ret42.yaml
start-lib1.ll reland "[lld-link] implement -start-lib and -end-lib" 2019-09-03 20:32:16 +00:00
start-lib2.ll reland "[lld-link] implement -start-lib and -end-lib" 2019-09-03 20:32:16 +00:00
std32.lib
std64.lib
stream.txt [ms] Add new /PDBSTREAM option to lld-link allowing injection of streams into PDB files. 2020-04-07 16:19:38 -04:00
thinlto-empty.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto-mangled-qux.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
tlssup-32.ll [LLD] Add baseline test for TLS alignment. NFC. 2020-10-13 20:53:32 -07:00
tlssup-64.ll [LLD] Add baseline test for TLS alignment. NFC. 2020-10-13 20:53:32 -07:00
tlssup.s [test] Fix the test from the previous commit when run on windows. NFC. 2019-07-23 07:28:23 +00:00
undefined-symbol-lto-a.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
undefined-symbol-lto-b.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
undefined-symbol-multi-lto.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
weak-external.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
weak-external2.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
weak-external3.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00