[llvm] [MSF] Fix max PDB file size when using /pdbpagesize (PR #186139)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 08:12:26 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: Tianlan Zhou (SuperSodaSea)

<details>
<summary>Changes</summary>

This PR updates the logic in the `getMaxFileSizeFromBlockSize` function to correct the maximum file size values for certain block sizes (a.k.a `/pdbpagesize`).

As stated in the function comment, the correct maximum file size should be 4/8/16/32 GiB, rather than of 4/8/12/16 GiB.

---
Full diff: https://github.com/llvm/llvm-project/pull/186139.diff


1 Files Affected:

- (modified) llvm/include/llvm/DebugInfo/MSF/MSFCommon.h (+2-2) 


``````````diff
diff --git a/llvm/include/llvm/DebugInfo/MSF/MSFCommon.h b/llvm/include/llvm/DebugInfo/MSF/MSFCommon.h
index 65f89b8483443..eb7ebcedbe805 100644
--- a/llvm/include/llvm/DebugInfo/MSF/MSFCommon.h
+++ b/llvm/include/llvm/DebugInfo/MSF/MSFCommon.h
@@ -114,9 +114,9 @@ inline uint64_t getMaxFileSizeFromBlockSize(uint32_t Size) {
   case 8192:
     return (uint64_t)UINT32_MAX * 2ULL;
   case 16384:
-    return (uint64_t)UINT32_MAX * 3ULL;
-  case 32768:
     return (uint64_t)UINT32_MAX * 4ULL;
+  case 32768:
+    return (uint64_t)UINT32_MAX * 8ULL;
   default:
     return (uint64_t)UINT32_MAX;
   }

``````````

</details>


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


More information about the llvm-commits mailing list