This is an archive of the discontinued LLVM Phabricator instance.

[pdb] Fix an uninitialized read, and add a test for it.
AcceptedPublic

Authored by zturner on Mar 16 2017, 5:10 PM.

Details

Reviewers
inglorion
rnk
Summary
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.

Diff Detail

Event Timeline

zturner created this revision.Mar 16 2017, 5:10 PM
rnk accepted this revision.Mar 16 2017, 5:12 PM

lgtm

This revision is now accepted and ready to land.Mar 16 2017, 5:12 PM