When compiling a file with GCC, then removing a line and compiling it again, lcov will be unable to read the generated coverage files. I've attached a shell script that does this behaviour.
I'm on Arch Linux x86_64 with GCC 4.7.2 and lcov 1.10 (although I have tested it with the trunk version and gotten the same results.)
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Confirmed on Linux Mint x86_64 with gcc 4.7.2 and lcov 1.9.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
A proposed fix.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I *think* I've fixed it, based on the idea that it's garbage left over by GCC resizing a file. This patch makes it so if an unhandled record leads to the end of a file, it finishes up its stuff, as that's what seems to be happening.
An interesting thing to note is that this doesn't happen with GCC 4.4, on the same sytem. I bisected GCC to find the the change happens when BASE_VER is updated to 4.7, so I'm curious if there's something going on with the new GCC 4.7 compatibility code. Or maybe my test is faulty with bisecting.
Last edit: Anonymous 2013-07-05
Fix added to the LCOV CVS repository.