From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57983 invoked by alias); 11 Feb 2016 09:51:33 -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 57957 invoked by uid 89); 11 Feb 2016 09:51:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=sentinel, commercial, Tel, office X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Feb 2016 09:51:31 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 11 Feb 2016 01:51:28 -0800 X-ExtLoop1: 1 Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga003.jf.intel.com with ESMTP; 11 Feb 2016 01:51:27 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.210]) by irsmsx110.ger.corp.intel.com ([169.254.15.31]) with mapi id 14.03.0248.002; Thu, 11 Feb 2016 09:51:26 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH v2 3/3] btrace, frame: fix crash in get_frame_type Date: Thu, 11 Feb 2016 09:51:00 -0000 Message-ID: References: <1454681922-2228-1-git-send-email-markus.t.metzger@intel.com> <1454681922-2228-3-git-send-email-markus.t.metzger@intel.com> <56B9D620.2020104@redhat.com> <56BA61C6.8060807@redhat.com> <56BB0A0D.80502@redhat.com> <56BB5872.2000604@redhat.com> In-Reply-To: <56BB5872.2000604@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00333.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Wednesday, February 10, 2016 4:34 PM > To: Metzger, Markus T > Cc: gdb-patches@sourceware.org > Subject: Re: [PATCH v2 3/3] btrace, frame: fix crash in get_frame_type >=20 > On 02/10/2016 03:02 PM, Metzger, Markus T wrote: >=20 > > No new fails there, as well (64-bit IA). > > > > I added a comment based on your statement that > frame_unwind_caller_xxx > > callers should check frame_unwind_caller_id and assert that > > skip_artificial_frames does not return NULL. > > > > Info frame doesn't crash. > > > > (gdb) info frame > > Stack level 0, frame at 0x0: > > rip =3D 0x4005b0 in bar (tailcall-only.c:29); saved rip =3D 0x4005c2 > > called by frame at 0x0 > ^^^^^^^^^^^^^^^ >=20 > > source language c. > > Arglist at unknown address. > > Locals at unknown address,Registers are not available in btrace > > record history > > > > This is from a tailcall-only frame stack in replay mode using the tailc= all-only > test. > > The real caller has not been recorded. >=20 > Not sure how you got that, since "called by frame" seems to indicates that > the frame was not TAILCALL_FRAME: That's the sentinel frame. I forgot to "up". Now it crashes;-) There are other cases where frame_unwind_caller_xxx callers don't check frame_unwind_caller_id: gdb/mips-linux-tdep.c gdb/glibc-tdep.c gdb/obsd-tdep.c gdb/tic6x-linux-tdep.c gdb/sol2-tdep.c gdb/nios2-linux-tdep.c They're used for skipping syscalls and ld.so. The latter should be called via gdbarch_skip_solib_resolver (gdbarch, stop_= pc) from infrun.c. Who is supposed to do the check in those cases? Maybe they are already OK? Regards, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928