]> granicus.if.org Git - llvm/commit
llvm-cov: Simplify coverage reports, fixing PR22575 in the process
authorJustin Bogner <mail@justinbogner.com>
Sat, 14 Feb 2015 02:01:24 +0000 (02:01 +0000)
committerJustin Bogner <mail@justinbogner.com>
Sat, 14 Feb 2015 02:01:24 +0000 (02:01 +0000)
commit9bdb194b8686c81c167c0490d63f39c5214c61bf
tree3888613dee26d8c423586448046f741204b9020c
parent894c8c514a9887fa7890f9c68d85b50fa61cdafc
llvm-cov: Simplify coverage reports, fixing PR22575 in the process

PR22575 occurred because we were unsafely storing references into a
std::vector. If the vector moved because it grew, we'd be left
iterating through garbage memory. This avoids the issue by simplifying
the logic to gather coverage information as we go, rather than storing
it and iterating over it.

I'm relying on the existing tests showing that this is semantically
NFC, since it's difficult to hit the issue this fixes without
relatively large covered programs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229215 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-cov/CMakeLists.txt
tools/llvm-cov/CodeCoverage.cpp
tools/llvm-cov/CoverageReport.cpp
tools/llvm-cov/CoverageReport.h
tools/llvm-cov/CoverageSummary.cpp [deleted file]
tools/llvm-cov/CoverageSummary.h [deleted file]
tools/llvm-cov/CoverageSummaryInfo.cpp
tools/llvm-cov/CoverageSummaryInfo.h