diff options
| author | Vladimir Gorsunov <gorsunov@gmail.com> | 2025-11-01 17:36:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-01 15:36:38 +0000 |
| commit | e3ef3e24f13a3671a08c742e48c324b429ef6417 (patch) | |
| tree | 3aeddfd303955eba64af2007a61cdbb95bf9c110 /llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test | |
| parent | fe1491b7258aaf821cda89d5ed5f5c5248007136 (diff) | |
| download | llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.zip llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.tar.gz llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.tar.bz2 | |
[NativePDB] Fix crash in llvm-pdbutil (#164871)
Fix out of buffer read when value of --type-index was too big
Co-authored-by: Alexandre Ganea <aganea@havenstudios.com>
Diffstat (limited to 'llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test')
| -rwxr-xr-x | llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test b/llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test new file mode 100755 index 0000000..aa3f6dc --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Native/pdb-native-index-overflow.test @@ -0,0 +1,13 @@ +; Test that the native PDB reader isn't crashed by index value bigger than +; number of types in TPI or IPI stream +; RUN: llvm-pdbutil dump %p/../Inputs/empty.pdb --type-index=20000000\ +; RUN: | FileCheck -check-prefixes=TYPES,NOT_FOUND %s +; RUN: llvm-pdbutil dump %p/../Inputs/empty.pdb --id-index=20000000\ +; RUN: | FileCheck -check-prefixes=IDS,NOT_FOUND %s + +TYPES: Types (TPI Stream) +IDS: Types (IPI Stream) +NOT_FOUND:============================================================ +NOT_FOUND: Showing 1 records. +NOT_FOUND: Type 0x1312D00 doesn't exist in TPI stream + |
