From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5969 invoked by alias); 11 Jul 2008 11:46:29 -0000 Received: (qmail 5961 invoked by uid 22791); 11 Jul 2008 11:46:29 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jul 2008 11:46:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7F9C798415; Fri, 11 Jul 2008 11:46:07 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 37B0098376; Fri, 11 Jul 2008 11:46:07 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KHH4g-0007mq-6y; Fri, 11 Jul 2008 07:46:06 -0400 Date: Fri, 11 Jul 2008 11:46:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [gdbserver] Uninitialized variable in linux-low.c:handle_extended_wait Message-ID: <20080711114606.GA29668@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <200807110337.m6B3b5FB004696@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200807110337.m6B3b5FB004696@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00186.txt.bz2 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