[PATCH] D31061: [pdb] Fix an uninitialized read, and add a test for it.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 17:10:33 PDT 2017


zturner created this revision.

  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.


https://reviews.llvm.org/D31061

Files:
  llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
  llvm/test/DebugInfo/PDB/Inputs/longname-truncation.yaml
  llvm/test/DebugInfo/PDB/pdb-longname-truncation.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31061.92086.patch
Type: text/x-patch
Size: 206855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170317/06d2337d/attachment-0001.bin>


More information about the llvm-commits mailing list