[Bug gcov-profile/49484] gcov crash if two(or more) forks happen at the same time

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Mon Mar 12 16:03:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49484

--- Comment #23 from rguenther at suse dot de <rguenther at suse dot de> 2012-03-12 16:02:34 UTC ---
On Mon, 12 Mar 2012, redi at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49484
> 
> --- Comment #22 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-03-12 15:56:07 UTC ---
> (In reply to comment #20)
> > I suppose
> > 
> > Index: libgcc/gthr-posix.h
> > ===================================================================
> > --- libgcc/gthr-posix.h (revision 185232)
> > +++ libgcc/gthr-posix.h (working copy)
> > @@ -77,7 +77,6 @@ typedef struct timespec __gthread_time_t
> > 
> >  #ifdef _GTHREAD_USE_MUTEX_INIT_FUNC
> >  # undef __GTHREAD_MUTEX_INIT
> > -# define __GTHREAD_MUTEX_INIT_FUNCTION __gthread_mutex_init_function
> >  #endif
> >  #ifdef _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
> >  # undef __GTHREAD_RECURSIVE_MUTEX_INIT
> > 
> > would fix it?
> 
> That fixes half the problem, then there's still the duplicate
> __gthread_mutex_init_function on line 749.  That should be defined
> unconditionally, but according to the spec in gthr.h should return void

Darn...

I'm preparing a patch for testing overnight (if you beat me to it,
the obvious patch is pre-approved, removing my copy of
__gthread_mutex_init_function and making yours defined
unconditionally).

Richard.



More information about the Gcc-bugs mailing list