[PATCH] D103297: [LLD][COFF] Reduce the maximum size of the GHASH table

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 07:03:09 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2b9b9652ce27: [LLD][COFF] Reduce the maximum size of the GHASH table (authored by aganea).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103297/new/

https://reviews.llvm.org/D103297

Files:
  lld/COFF/DebugTypes.cpp


Index: lld/COFF/DebugTypes.cpp
===================================================================
--- lld/COFF/DebugTypes.cpp
+++ lld/COFF/DebugTypes.cpp
@@ -1071,7 +1071,8 @@
 
   // Cap the table size so that we can use 32-bit cell indices. Type indices are
   // also 32-bit, so this is an inherent PDB file format limit anyway.
-  tableSize = std::min(size_t(INT32_MAX), tableSize);
+  tableSize =
+      std::min(size_t(INT32_MAX) - TypeIndex::FirstNonSimpleIndex, tableSize);
   ghashState.table.init(static_cast<uint32_t>(tableSize));
 
   // Insert ghashes in parallel. During concurrent insertion, we cannot observe


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103297.348517.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210528/c791013b/attachment.bin>


More information about the llvm-commits mailing list