From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13116 invoked by alias); 12 Nov 2009 00:43:04 -0000 Received: (qmail 13108 invoked by uid 22791); 12 Nov 2009 00:43:03 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Nov 2009 00:42:59 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 38BCD10927; Thu, 12 Nov 2009 00:42:57 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id B6CAF1078F; Thu, 12 Nov 2009 00:42:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1N8Nm3-0006oz-Go; Wed, 11 Nov 2009 19:42:55 -0500 Date: Thu, 12 Nov 2009 00:43:00 -0000 From: Daniel Jacobowitz To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix for PR gdb/10838 Message-ID: <20091112004255.GA26101@caradoc.them.org> Mail-Followup-To: Paul Pluzhnikov , gdb-patches@sourceware.org References: <20091112003504.29C4876D6F@ppluzhnikov.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091112003504.29C4876D6F@ppluzhnikov.mtv.corp.google.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2009-11/txt/msg00274.txt.bz2 On Wed, Nov 11, 2009 at 04:35:03PM -0800, Paul Pluzhnikov wrote: > Greetings, > > In http://sourceware.org/bugzilla/show_bug.cgi?id=10838 > gdb attach; detach; attach sequence leaves libpthread in hosed state. > > The root cause turned out to be that this: > > td_event_emptyset (&events); > info->td_ta_set_event_p (info->thread_agent, &events); > > is a no-op -- glibc ORs new event bits in, but doesn't clear any already > set bits. To clear them, one must call td_ta_clear_event() instead. > > Here is a patch which fixes this in gdb and gdbserver. > > Tested (GDB only) on Linux/x86_64 with no regressions. OK, thanks. -- Daniel Jacobowitz CodeSourcery