From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21214 invoked by alias); 8 Jan 2015 20:49:54 -0000 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 Received: (qmail 21205 invoked by uid 89); 8 Jan 2015 20:49:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 08 Jan 2015 20:49:52 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t08KnmvR021930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Jan 2015 15:49:48 -0500 Received: from host2.jankratochvil.net (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t08KniE2029539 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 8 Jan 2015 15:49:46 -0500 Date: Thu, 08 Jan 2015 20:49:00 -0000 From: Jan Kratochvil To: Markus Metzger Cc: palves@redhat.com, gdb-patches@sourceware.org Subject: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure] Message-ID: <20150108204943.GA4851@host2.jankratochvil.net> References: <1389686678-9039-1-git-send-email-markus.t.metzger@intel.com> <1389686678-9039-7-git-send-email-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389686678-9039-7-git-send-email-markus.t.metzger@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00200.txt.bz2 On Tue, 14 Jan 2014 09:04:16 +0100, Markus Metzger wrote: [...] > +/* Allocate and initialize a new branch trace function segment. > + PREV is the chronologically preceding function segment. > + MFUN and FUN are the symbol information we have for this function. */ > + > +static struct btrace_function * > +ftrace_new_function (struct btrace_function *prev, > + struct minimal_symbol *mfun, > + struct symbol *fun) > +{ > + struct btrace_function *bfun; > + > + bfun = xzalloc (sizeof (*bfun)); > + > + bfun->msym = mfun; > + bfun->sym = fun; > + bfun->flow.prev = prev; > + > + /* We start with the identities of min and max, respectively. */ > + bfun->lbegin = INT_MAX; > + bfun->lend = INT_MIN; > > - if (filename == NULL) > - filename = ""; > + if (prev != NULL) > + { > + gdb_assert (prev->flow.next == NULL); (gdb) PASS: gdb.btrace/multi-thread-step.exp: navigate: thread 1: record goto begin info record^M Active record target: record-btrace^M btrace.c:220: internal-error: ftrace_new_function: Assertion `prev->flow.next == NULL' failed.^M This occasionally happens on x86_64 system with -m32 inferior: runtest CC_FOR_TARGET="gcc -m32" CXX_FOR_TARGET="g++ -m32" gdb.btrace/multi-thread-step.exp cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz stepping : 2 microcode : 0x2a > + prev->flow.next = bfun; > > - return (filename_cmp (bfile, filename) != 0); > + bfun->number = prev->number + 1; > + bfun->insn_offset = (prev->insn_offset > + + VEC_length (btrace_insn_s, prev->insn)); > + } > + > + return bfun; > } Although for -m32 inferior there are 100% reproducible more FAILs: FAIL: gdb.btrace/rn-dl-bind.exp: reverse-next FAIL: gdb.btrace/rn-dl-bind.exp: reverse-step FAIL: gdb.btrace/rn-dl-bind.exp: reverse-step FAIL: gdb.btrace/rn-dl-bind.exp: reverse-next FAIL: gdb.btrace/rn-dl-bind.exp: next (the program exited) FAIL: gdb.btrace/exception.exp: flat (pattern 1) FAIL: gdb.btrace/exception.exp: indented (pattern 1) So I do not think the assert may be such a critical issue as IIUC btrace is probably not used for 32-bit inferiors. Regards, Jan