Menu

#165 lcov fails when removing lines from a file

open
nobody
Tools (21)
5
2013-12-13
2013-04-03
Anonymous
No

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.)

Discussion

  • Melvin Kicchi

    Melvin Kicchi - 2013-04-05

    Confirmed on Linux Mint x86_64 with gcc 4.7.2 and lcov 1.9.

     
  • Anonymous

    Anonymous - 2013-04-10

    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
  • Peter Oberparleiter

    Fix added to the LCOV CVS repository.

     

Log in to post a comment.