http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58602
Greg Banks <gbanks at sgi dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gbanks at sgi dot com --- Comment #1 from Greg Banks <gbanks at sgi dot com> --- This bug can affect users of ggcov (http://ggcov.sf.net), which reads the .gcno files directly rather than running any gcc code. Usually the problem is harmless, as ggcov complains and stops parsing because it tries to read random leftover bytes as a gcov tag. However it's possible that other subtle problems can creep in, like lines being double-counted. The bug appears to have been introduced in this commit http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8ab576411b46496e6baf77ba1aed1f38b6c818cd which nine years ago (!) changed the actual code path taken from an fopen("wb") to an open(O_RDWR|O_CREAT) plus an fdopen(). One of the differences between those is that the old code had the side effect of truncating an existing file, and the new code doesn't. It looks like every version of gcc since 3.4 is affected.