[all-commits] [llvm/llvm-project] d80018: [lld][COFF] Fix TypeServerSource lookup on GUID co...

Vladimir Vereschaka via All-commits all-commits at lists.llvm.org
Thu Apr 14 22:26:47 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: d800180f6bee3b5fd91d63095c3b06f26ae8076d
      https://github.com/llvm/llvm-project/commit/d800180f6bee3b5fd91d63095c3b06f26ae8076d
  Author: Tobias Hieta <tobias.hieta at ubisoft.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M lld/COFF/DebugTypes.cpp
    A lld/test/COFF/Inputs/pdb-type-server-guid-collision-a-pdb.yaml
    A lld/test/COFF/Inputs/pdb-type-server-guid-collision-a.yaml
    A lld/test/COFF/Inputs/pdb-type-server-guid-collision-b-pdb.yaml
    A lld/test/COFF/Inputs/pdb-type-server-guid-collision-b.yaml
    A lld/test/COFF/pdb-type-server-guid-collision-invalid.test
    A lld/test/COFF/pdb-type-server-guid-collision-valid.test

  Log Message:
  -----------
  [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

(cherry picked from commit 98bc304e9faded44f1d8988ffa4c5d8b50c759ec)


  Commit: e11b929a3c97d8b22a2765bab1a86b84d322dfd1
      https://github.com/llvm/llvm-project/commit/e11b929a3c97d8b22a2765bab1a86b84d322dfd1
  Author: Tobias Hieta <tobias at hieta.se>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M lld/COFF/DebugTypes.cpp
    M lld/test/COFF/pdb-type-server-guid-collision-invalid.test
    M lld/test/COFF/pdb-type-server-guid-collision-valid.test

  Log Message:
  -----------
  [LLD][COFF] Fix TypeServerSource matcher with more than one collision

Follow-up from 98bc304e9faded44f1d8988ffa4c5d8b50c759ec - while that
commit fixed when you had two PDBs colliding on the same Guid it didn't
fix the case where you had more than two PDBs using the same Guid.

This commit fixes that and also tests much more carefully that all
the types are correct no matter the order.

Reviewed By: aganea, saudi

Differential Revision: https://reviews.llvm.org/D123185

(cherry picked from commit 0dfa8a019d9a64d7706eb82bdb083fd9b815e088)


  Commit: 46d19f3a8699da61210a45dbb518bcba863de0c3
      https://github.com/llvm/llvm-project/commit/46d19f3a8699da61210a45dbb518bcba863de0c3
  Author: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/cmake/caches/CrossWinToARMLinux.cmake

  Log Message:
  -----------
  [CMake] Use CMAKE_SYSROOT to build libs for Win to ARM cross tooolchain. NFC.

Provide CMAKE_SYSROOT for the libc++/libc++abi/libunwind libraries
instead of specific <foo>_SYSROOT for each of them.

Fixed passing some CMake arguments for the runtimes.

Referenced Differentials:
 * https://reviews.llvm.org/D119836
 * https://reviews.llvm.org/D112155
 * https://reviews.llvm.org/D111672

Differential Revision: https://reviews.llvm.org/D120383

(cherry picked from commit 18fa0b15ccf610f34af1231440f89d20cb99e7a0)


  Commit: b6dbee34387de2347e48198c8115053802ad71cb
      https://github.com/llvm/llvm-project/commit/b6dbee34387de2347e48198c8115053802ad71cb
  Author: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/cmake/caches/CrossWinToARMLinux.cmake

  Log Message:
  -----------
  [CMake] Update cache file for Win to ARM cross tooolchain. NFC.

Removed passing CMAKE_AR from the library configurations.

(cherry picked from commit 19c1b084a7da9087fcdc16071b461ea33b6a68b4)


  Commit: 6c41c8edb0ccc0a3502bd417cb6fb652e2205dd6
      https://github.com/llvm/llvm-project/commit/6c41c8edb0ccc0a3502bd417cb6fb652e2205dd6
  Author: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/cmake/caches/CrossWinToARMLinux.cmake

  Log Message:
  -----------
  [CMake] Replace `TARGET_TRIPLE` with `TOOLCHAIN_TARGET_TRIPLE` for Win-to-Arm cross toolchain cache file. NFC.

Avoid using TARGET_TRIPLE argument for the cross toolchain cmake cache file and replace it
with TOOLCHAIN_TARGET_TRIPLE.

Reference: https://reviews.llvm.org/D119918

Differential Revision: https://reviews.llvm.org/D121029

(cherry picked from commit d860ac5da6d71dd759d347a3c7d5e63705443694)


  Commit: 3400d0293a14d385a7b8e39e65be72f0c6adecb8
      https://github.com/llvm/llvm-project/commit/3400d0293a14d385a7b8e39e65be72f0c6adecb8
  Author: Vladimir Vereschaka <vvereschaka at accesssoftek.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M clang/cmake/caches/CrossWinToARMLinux.cmake

  Log Message:
  -----------
  [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.

* fixed remote test script arguments for libc++/compiler-rt libraries.
* disabled shared libc++abi libraries (to let remote tests get passed).

(cherry picked from commit 41f74bc7ae33d9cd9a1eaacfc29ba53a933c042f)


Compare: https://github.com/llvm/llvm-project/compare/8c3445ac1c8b...3400d0293a14


More information about the All-commits mailing list