[PATCH] D102713: [PDB] Improve error handling when writes fail
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 14:12:40 PDT 2021
aganea added a comment.
We had similar OOM issues on the bots, as mentionned in the two bug reports. Regarding https://bugs.chromium.org/p/chromium/issues/detail?id=1179085, if you're using `/DEBUG:GHASH` the following patch might fix it? (but still generates > 4 GB .PDBs, which is probably a merging bug)
diff --git a/lld/COFF/DebugTypes.cpp b/lld/COFF/DebugTypes.cpp
index fedcb054540f..8bd8723f4bf2 100644
--- a/lld/COFF/DebugTypes.cpp
+++ b/lld/COFF/DebugTypes.cpp
@@ -1064,7 +1064,8 @@ void TypeMerger::mergeTypesWithGHash() {
// 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
The issue was that `source->indexMapStorage[i] = TypeIndex::fromArrayIndex(cellIdx);` would store invalid offsets since the high bit (`DecoratedItemIdMask`) is dismissed when doing `TypeIndex::toArrayIndex()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102713/new/
https://reviews.llvm.org/D102713
More information about the llvm-commits
mailing list