From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30689 invoked by alias); 18 Aug 2008 11:47:01 -0000 Received: (qmail 30680 invoked by uid 22791); 18 Aug 2008 11:47:01 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 18 Aug 2008 11:46:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 314982A96DD; Mon, 18 Aug 2008 07:46:25 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AkhMFddSYjXk; Mon, 18 Aug 2008 07:46:25 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id AEEDF2A96D3; Mon, 18 Aug 2008 07:46:24 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C45F1E7ACD; Mon, 18 Aug 2008 13:46:17 +0200 (CEST) Date: Mon, 18 Aug 2008 11:47:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc] Fix removing breakpoint from shared library race Message-ID: <20080818114617.GH16894@adacore.com> References: <200808132034.m7DKYEEK005260@d12av02.megacenter.de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200808132034.m7DKYEEK005260@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.4.2.2i 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-08/txt/msg00472.txt.bz2 > When *removing* breakpoints, however, there is no such check. I have a > multi-threaded test case that reproducibly runs into an error when trying > to remove a breakpoint from a shared library that was *just* unloaded. [...] > Am I missing some reason why we shouldn't get to this point? Otherwise, > this seems a reasonble solution to me ... The fix looks reasonable to me, but I'm not sure, though. Perhaps part of the problem is that I don't see how you got there in your example (I'm having trouble figuring out a case where the debugger would end up removing a breakpoint while a shared library has just been unloaded). Could you post more details? -- Joel