llvm/lib/ProfileData
Justin Bogner 0a64b6de98 InstrProf: Fix reading of consecutive 32 bit coverage maps
When we generate coverage data, we explicitly set each coverage map's
alignment to 8 (See InstrProfiling::lowerCoverageData), but when we
read the coverage data, we assume consecutive maps are exactly
adjacent. When we're dealing with 32 bit, maps can end on a 4 byte
boundary, causing us to think the padding is part of the next record.

Fix this by adjusting the buffer to an appropriately aligned address
between records.

This is pretty awkward to test, as it requires a binary with multiple
coverage maps to hit, so we'd need to check in multiple source files
and a binary blob as inputs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239129 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-05 01:23:42 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
CoverageMapping.cpp InstrProf: Treat functions with a coverage map but no profile as unreached 2015-05-13 22:03:04 +00:00
CoverageMappingReader.cpp InstrProf: Fix reading of consecutive 32 bit coverage maps 2015-06-05 01:23:42 +00:00
CoverageMappingWriter.cpp
InstrProf.cpp InstrProf: Give coverage its own errors instead of piggy backing on instrprof 2015-05-06 23:19:35 +00:00
InstrProfIndexed.h
InstrProfReader.cpp InstrProf: Allow hexadecimal function hashes in proftext format 2015-03-09 18:54:49 +00:00
InstrProfWriter.cpp Re-apply "InstrProf: Add unit tests for the profile reader and writer" 2015-02-18 01:58:17 +00:00
LLVMBuild.txt
Makefile
SampleProf.cpp
SampleProfReader.cpp
SampleProfWriter.cpp