[llvm] [NativePDB] Fix crash in llvm-pdbutil (PR #164871)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 24 06:38:25 PDT 2025


================
@@ -194,6 +194,8 @@ Error LazyRandomTypeCollection::visitRangeForType(TypeIndex TI) {
   }
 
   visitRange(TIB, Prev->Offset, TIE);
+  if (Records.size() <= TI.toArrayIndex())
+    return make_error<CodeViewError>("Type index too big");
----------------
Nerixyz wrote:

I see, thank you for the explanation. 

A comment explaining why the check is done there (similar to the comment you linked) would be great.

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


More information about the llvm-commits mailing list