This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Make sigthread.exp more reliable
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jim Blandy <jimb at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jan 2008 13:09:22 -0500
- Subject: Re: RFA: Make sigthread.exp more reliable
- References: <m33at3vng0.fsf@codesourcery.com>
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!
--
Daniel Jacobowitz
CodeSourcery