[llvm] [pdb] Provide a better error message when overflowing the public/global symbol record stream (PR #140884)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 00:55:30 PDT 2025
================
@@ -319,7 +320,14 @@ Error GSIStreamBuilder::finalizeMsfLayout() {
return Idx.takeError();
PublicsStreamIndex = *Idx;
- uint32_t RecordBytes = PSH->RecordByteSize + GSH->RecordByteSize;
+ uint64_t RecordBytes = PSH->RecordByteSize + GSH->RecordByteSize;
+ if (RecordBytes > UINT32_MAX)
+ return make_error<StringError>(
+ formatv("the public ({0} bytes) and global ({1} bytes) "
+ "symbols are too large to fit in a PDB file; "
+ "the maximum total is {2} bytes.",
----------------
zmodem wrote:
Thanks, going with "the public symbols and global symbols" in 6bb05ea4b888e7e65f7f4df7e6bb8fd156730404
https://github.com/llvm/llvm-project/pull/140884
More information about the llvm-commits
mailing list