[PATCH] D20285: [Coverage] Ensure that coverage mapping data has an expected alignment in 'covmapping' files.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 08:21:37 PDT 2016


vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.

This lgtm with a nit.


================
Comment at: lib/ProfileData/Coverage/CoverageMappingReader.cpp:496
@@ +495,3 @@
+  if (CoverageMapping.size() < 1)
+    return coveragemap_error::malformed;
+  size_t Pad = alignmentAdjustment(CoverageMapping.data(), 8);
----------------
Could you use the `truncated` error for this (to match line 475)?


http://reviews.llvm.org/D20285





More information about the llvm-commits mailing list