https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78783
Opera Wang <wangvisual at sohu dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wangvisual at sohu dot com --- Comment #2 from Opera Wang <wangvisual at sohu dot com> --- We have similar issues in our environment, and I found two situations can trigger it. 1. When profile2 have more files than profile1, which is fixed in bug 67097 2. When nftw has issues and can't remove all gcda files in output dir. in gcov-tool.c, unlink_profile_dir: return nftw(path, unlink_gcda_file, 64, FTW_DEPTH | FTW_PHYS); then later when call dump_one_gcov: tag = gcov_read_unsigned (); if (tag) // <= here tag would be valid because some gcda files still exist in output dir nftw is in libc, and on machine1: ldd (GNU libc) 2.12, Linux 2.6.32-220.el6.x86_64, RedHat Enterprise Linux 6.2 nftw can't remove all gcda files, but if I call nftw the 2nd time, then the left gcda files will be removed, so it's not a permission issue. but on machine2: ldd (GNU libc) 2.5, Linux 2.6.18-371.9.1.el5 x86_64, RedHat Enterprise Linux 5.7 nftw works without any problems. We have to workaround the 2nd issue by output to a new dir, instead of reuse an existing dir.