This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gdbserver] Uninitialized variable in linux-low.c:handle_extended_wait


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]