From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26564 invoked by alias); 7 Mar 2013 10:33:39 -0000 Received: (qmail 26554 invoked by uid 22791); 7 Mar 2013 10:33:38 -0000 X-SWARE-Spam-Status: No, hits=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Mar 2013 10:33:32 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 07 Mar 2013 02:33:30 -0800 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 07 Mar 2013 02:33:23 -0800 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.1.355.2; Thu, 7 Mar 2013 10:31:39 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.244]) by IRSMSX151.ger.corp.intel.com ([169.254.4.245]) with mapi id 14.01.0355.002; Thu, 7 Mar 2013 10:31:39 +0000 From: "Metzger, Markus T" To: Jan Kratochvil CC: "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" , "Himpel, Christian" Subject: RE: Crash of GDB with gdbserver btrace enabled [Re: [patch v9 00/23] branch tracing support for Atom] Date: Thu, 07 Mar 2013 10:33:00 -0000 Message-ID: References: <1362416770-19750-1-git-send-email-markus.t.metzger@intel.com> <20130306124334.GA29994@host2.jankratochvil.net> <20130306170622.GA25771@host2.jankratochvil.net> <20130307090632.GA11095@host2.jankratochvil.net> <20130307101350.GA14969@host2.jankratochvil.net> In-Reply-To: <20130307101350.GA14969@host2.jankratochvil.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: 2013-03/txt/msg00277.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Thursday, March 07, 2013 11:14 AM > > void > > pop_target (void) > > { > > target_close (target_stack, 0); /* Let it clean up. */ > > if (unpush_target (target_stack) =3D=3D 1) > > return; > > > > fprintf_unfiltered (gdb_stderr, > > "pop_target couldn't find target %s\n", > > current_target.to_shortname); > > internal_error (__FILE__, __LINE__, > > _("failed internal consistency check")); > > } > > > > Isn't pop_target closing the topmost target twice? > > > > When I remove the first call to target_close and do not turn errors into > > warnings in record_btrace_close, the crash is gone. I have no clue abo= ut > > the side effects of this, though. >=20 >=20 > OK, I agree target_close seems excessive here, it also does not correspon= d to > the current description of target_close: > This routine is automatically always called after popping the target > off the target stack >=20 > While it is nice cleanup I find it a separate patch, not required for btr= ace. With this patch, the crash is gone with only minimal changes to btrace. OK to add it as separate patch to the btrace series? Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052