This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] libstdc++/17780
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 6 Oct 2004 10:16:06 -0500
- Subject: Re: [v3] libstdc++/17780
- Organization: Red Hat / Chicago
- References: <20041005231818.06ab5bc2.bkoz@redhat.com><4163AA31.50501@suse.de>
> if (__gthread_active_p())
> {
>- __gthread_mutex_lock(__bin._M_mutex);
> if (__bin._M_first[0] == NULL)
> {
>- // No need to hold the lock when we are adding a
>- // whole chunk to our own list.
>- __gthread_mutex_unlock(__bin._M_mutex);
>
>
>Basically, you don't take the lock before checking _bin._M_first[0] == NULL.
Whoops. You are right. I'll revert this bit.
Thanks!
-benjamin