This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [gdbserver] Uninitialized variable in linux-low.c:handle_extended_wait
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 11 Jul 2008 07:46:06 -0400
- Subject: Re: [gdbserver] Uninitialized variable in linux-low.c:handle_extended_wait
- References: <200807110337.m6B3b5FB004696@d12av02.megacenter.de.ibm.com>
On Fri, Jul 11, 2008 at 05:37:05AM +0200, Ulrich Weigand wrote:
> Note how "status" is used uninitialized if pull_pid_from_list
> returns true. In my case, this causes the "else" branch to be
> taken, which sets "stop_expected", which causes gdbserver to
> hang later on while waiting on the SIGSTOP which actually
> already arrived ...
>
> I'm not quite sure how to handle this -- I assume processes
> on the stopped_pids list should always be handled as if they
> got a SIGSTOP? The following patch fixes the hang for me ...
>
> Does this make sense?
Completely; your patch is OK. The code only triggers rarely, so I
just merged the version I wrote for linux-nat.c some time ago to
gdbserver. Apparently I did it wrong :-)
--
Daniel Jacobowitz
CodeSourcery