[llvm] [pdb] Provide a better error message when overflowing the public/global symbol record stream (PR #140884)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 11:27:28 PDT 2025


================
@@ -319,7 +320,13 @@ 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) "
----------------
rnk wrote:

Github shows some kind of syntax error, maybe you have local fixup changes that didn't get pushed.

https://github.com/llvm/llvm-project/pull/140884


More information about the llvm-commits mailing list