[PATCH] libgcov and umask

Johan Kristell johan.kristell@axis.com
Tue Aug 11 06:05:00 GMT 2009


Profiling an application with a to restrictive set umask currently fails
due to libgcov inheriting the umask of the application.

This patch fixes this by temporarily changing the umask when writing to
the data file.

Tested on i386-linux

2009-08-04  Johan Kristell  <johan.kristell@axis.com>

	* libgcov.c (gcov_exit): Temporarily change the umask to allow
	writing to the data file from the library even if the umask of
	the application is set to restrictive.

	* gcc.misc-tests/gcov-12.c: New testcase.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgcov-umask.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090811/e20f2b9c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcov-12.c
Type: text/x-csrc
Size: 296 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090811/e20f2b9c/attachment-0001.bin>


More information about the Gcc-patches mailing list