Hide Forgot
Description of problem: After doing a profiling run of an instrumented binary, a *.gcda file is generated. When rebuilding with --profile-use gcc44 will say that a *.cgda file owned by another user (but with readable permissions) "does not exist" even though the file is readable. Version-Release number of selected component (if applicable): gcc44-4.4.4-13.el5 (x86) How reproducible: Always Steps to Reproduce: 1. As User A use gcc44 to create *.gcda file 2. As User B attempt to read *.gcda with gcc44's --profile-use 3. Actual results: gcc44 complains that a file that is clearly present and readable is "not found" Expected results: Given appropriate read permissions, *.gcda files should be readable by gcc44. Additional info: [steve@nemesis ~]$ vi /tmp/testapp.c [steve@nemesis ~]$ gcc44 --profile-dir=/tmp --profile-generate -O2 -o /tmp/testapp /tmp/testapp.c [steve@nemesis ~]$ /tmp/testapp got here [steve@nemesis ~]$ ll /tmp/testapp* -rwxr-xr-x 1 steve users 15984 May 16 13:12 /tmp/testapp -rw-r--r-- 1 steve users 98 May 16 13:12 /tmp/testapp.c -rw-r--r-- 1 steve users 144 May 16 13:13 /tmp/testapp.gcda [steve@nemesis ~]$ rm -f /tmp/testapp [steve@nemesis ~]$ su - nancy Password: [nancy@nemesis ~]$ gcc44 --profile-dir=/tmp --profile-use -O2 -o /tmp/testapp /tmp/testapp.c /tmp/testapp.c: In function âmainâ: /tmp/testapp.c:8: note: file /tmp/testapp.gcda not found, execution counts estimated [nancy@nemesis ~]$ file /tmp/testapp.gcda /tmp/testapp.gcda: data [nancy@nemesis ~]$ rm -f /tmp/testapp [nancy@nemesis ~]$ exit [steve@nemesis ~]$ gcc44 --profile-dir=/tmp --profile-use -O2 -o /tmp/testapp /tmp/testapp.c [steve@nemesis ~]$ ll /tmp/testapp* -rwxr-xr-x 1 steve users 4951 May 16 13:18 /tmp/testapp -rw-r--r-- 1 steve users 98 May 16 13:12 /tmp/testapp.c -rw-r--r-- 1 steve users 144 May 16 13:13 /tmp/testapp.gcda
This is something that has been changed in gcc 4.5: http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01170.html http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152419 In older gccs it used to open them always in write mode. I don't think this is severe enough for it to be backported.