[llvm] [NativePDB] Fix crash in llvm-pdbutil (PR #164871)
Vladimir Gorsunov via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 25 13:57:30 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");
----------------
gv wrote:
Moved the check to `tryGetType` to replace the assertion per @aganea's suggestion. I think it's overall good idea to get rid of assertions based on input data. Even if some part of debuginfo became corrupted it doesn't mean the entire debug session needs to be aborted
https://github.com/llvm/llvm-project/pull/164871
More information about the llvm-commits
mailing list