OSDN Git Service

[Coverage] PR33517: Check for failure to load func records
authorVedant Kumar <vsk@apple.com>
Tue, 20 Jun 2017 02:05:35 +0000 (02:05 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 20 Jun 2017 02:05:35 +0000 (02:05 +0000)
commit9f0d281d87c0544be5b54e881482c7f18c33725d
treecdc6bb70cbdaa3537fab742da959d1c59affbaea
parentb9454635c0f598c66402692e3e8370f263592b83
[Coverage] PR33517: Check for failure to load func records

With PR33517, it became apparent that symbol table creation can fail
when presented with malformed inputs. This patch makes that sort of
error detectable, so llvm-cov etc. can fail more gracefully.

Specifically, we now check that function records loaded from corrupted coverage
mapping data are rejected, e.g when the recorded function name is garbage.

Testing: check-{llvm,clang,profile}, some unit test updates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305767 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ProfileData/Coverage/CoverageMapping.cpp
unittests/ProfileData/CoverageMappingTest.cpp