summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/PDB/pdb-longname-truncation.test
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-17 00:15:55 +0000
committerZachary Turner <zturner@google.com>2017-03-17 00:15:55 +0000
commit2ed2aa75bffa6596bffbf843fb8589d56f4c913e (patch)
treead28e32f3895ff1e012d37bdb9c6019fe3edc30f /llvm/test/DebugInfo/PDB/pdb-longname-truncation.test
parent42cb87f40126f272ff006679f64670066e250b70 (diff)
downloadbcm5719-llvm-2ed2aa75bffa6596bffbf843fb8589d56f4c913e.tar.gz
bcm5719-llvm-2ed2aa75bffa6596bffbf843fb8589d56f4c913e.zip
[pdb] Fix an uninitialized read, and add a test for it.
This was originally reported in pr32249, uncovered by PTVS-Studio. There was no code coverage for this path because it was difficult to construct odd-case PDB files that were not generated by cl. Now that we can write construct minimal PDB files from YAML, it's easy to construct fragments that generate whatever we want. In this patch I add a test that creates 2 type records. One with a unique name, and one without. I verify that we can go from PDB to Yaml with no errors. In a future patch I'd like to add something like llvm-pdbdump raw -lookup-type that will just dump one record and nothing else, which should make it a bit cleaner to find this kind of thing. llvm-svn: 298017
Diffstat (limited to 'llvm/test/DebugInfo/PDB/pdb-longname-truncation.test')
-rw-r--r--llvm/test/DebugInfo/PDB/pdb-longname-truncation.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/PDB/pdb-longname-truncation.test b/llvm/test/DebugInfo/PDB/pdb-longname-truncation.test
new file mode 100644
index 00000000000..2e0284fbe91
--- /dev/null
+++ b/llvm/test/DebugInfo/PDB/pdb-longname-truncation.test
@@ -0,0 +1,3 @@
+; For now just verify that this doesn't cause an error. Later we pdbdump can
+; do type lookup, we can verify that the name matches what we expect.
+; RUN: llvm-pdbdump yaml2pdb -pdb=%t.pdb %p/Inputs/longname-truncation.yaml
OpenPOWER on IntegriCloud