This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/49484] gcov crash if two(or more) forks happen at the same time
- From: "asharif at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 May 2012 21:22:51 +0000
- Subject: [Bug gcov-profile/49484] gcov crash if two(or more) forks happen at the same time
- Auto-submitted: auto-generated
- References: <bug-49484-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49484
--- Comment #24 from asharif at gcc dot gnu.org 2012-05-01 21:22:51 UTC ---
Author: asharif
Date: Tue May 1 21:22:47 2012
New Revision: 187026
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187026
Log:
Backported r185231 from trunk.
2012-03-12 Richard Guenther <rguenther@suse.de>
* gthr.h (__GTHREAD_MUTEX_INIT_FUNCTION): Adjust specification.
* gthr-posix.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
(__gthread_mutex_init_function): New function.
* gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Define.
PR gcov/49484
* libgcov.c: Include gthr.h.
(__gcov_flush_mx): New global variable.
(init_mx, init_mx_once): New functions.
(__gcov_flush): Protect self with a mutex.
(__gcov_fork): Re-initialize mutex after forking.
* unwind-dw2-fde.c: Change condition under which to use
__GTHREAD_MUTEX_INIT_FUNCTION.
Modified:
branches/google/gcc-4_6/ (props changed)
branches/google/gcc-4_6/gcc/ChangeLog.google-4_6
branches/google/gcc-4_6/gcc/gthr-posix.h
branches/google/gcc-4_6/gcc/gthr-single.h
branches/google/gcc-4_6/gcc/gthr.h
branches/google/gcc-4_6/gcc/libgcov.c
branches/google/gcc-4_6/gcc/unwind-dw2-fde.c
branches/google/gcc-4_6/libgcc/ChangeLog
Propchange: branches/google/gcc-4_6/
('svn:mergeinfo' modified)