This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Make sigthread.exp more reliable
On Jan 29, 2008 10:09 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Jan 11, 2008 at 05:31:59PM -0800, Jim Blandy wrote:
> >
> > sigthread.exp fails intermittently, because the program exits due to a
> > segfault instead of the ^C GDB sends it. I believe this is because
> > the threads throwing signals at each other don't wait until all the
> > pthread_t variables are initialized before they do so. So they
> > occasionally pass an uninitialized pthread_t to pthread_kill, which
> > segfaults.
>
> I'd been wondering what that crash was about...
>
> > 2008-01-11 Jim Blandy <jimb@codesourcery.com>
> >
> > * gdb.threads/sigthread.c: Use barriers to ensure that
> > child_thread and child_thread_two are always initialized before we
> > start to use them.
>
> Looks OK to me!
Committed --- thanks!