From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11080 invoked by alias); 14 Feb 2012 18:10:25 -0000 Received: (qmail 11048 invoked by uid 22791); 14 Feb 2012 18:10:22 -0000 X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_50,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 18:10:07 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1RxMpI-0006Ro-2M for gdb-patches@sources.redhat.com; Tue, 14 Feb 2012 19:10:04 +0100 Received: from 209.226.137.107 ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 19:10:04 +0100 Received: from aristovski by 209.226.137.107 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Feb 2012 19:10:04 +0100 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: Re: [patch] Assert when 'break' with no arguments Date: Tue, 14 Feb 2012 18:53:00 -0000 Message-ID: <4F3AA28A.6090501@qnx.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gdb-patches@sources.redhat.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0 In-Reply-To: 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: 2012-02/txt/msg00278.txt.bz2 Please disregard line "# This file was written by Rob Savoye. (rob@cygnus.com)" from the test, I will remove it before commit. Sorry about that. On 12-02-14 01:02 PM, Aleksandar Ristovski wrote: > Hello, > > An issue exists where if 'break' command is issued while on a line that > underwent inlining by the compiler gdb asserts with > > Assertion `sal.pspace != NULL' > > I narrowed down the issue to frame.c:find_frame_sal, combined with > stack.c:set_last_displayed_sal and in the view of print_frame_info. > > The fix proposed here would be to properly initialize 'sal' in > find_frmae_sal. Additional check is performed in set_last_displayed_sal > to make sure we do not set last_displayed_* vars and validate them if > pspace is NULL as, clearly, the rest of the code expects it to be > properly set. > > I identified the same issue in 7.2, 7.3.1, 7.4 and HEAD. I have not > checked earlier versions. > > Test suite did not show regressions, and new test passes where it would > fail without the patch. > > > ChangeLog: > 2012-02-14 Aleksandar Ristovski > > * frame.c (find_frame_sal): Initialise sal->pspace field from frame data. > * stack.c (set_last_displayed_sal): Perform sanity check of the data > passed in, in particular, validate that PSPACE is not NULL if requesting > valid last_displayed_* data. > > > Test suite ChangeLOg: > 2012-02-14 Aleksandar Ristovski > > * gdb.base/break-inline.exp: New test. > * gdb.base/break-inline.c: New test. > > > Attached are patch for the fix and tests. > > > > Thank you, > > Aleksandar Ristovski > QNX Software Systems From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6163 invoked by alias); 14 Feb 2012 18:06:27 -0000 Received: (qmail 6146 invoked by uid 22791); 14 Feb 2012 18:06:26 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_50,MISSING_HEADERS X-Spam-Check-By: sourceware.org Received: from na3sys009aog120.obsmtp.com (HELO na3sys009aog120.obsmtp.com) (74.125.149.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 18:06:09 +0000 Received: from hub6.qnx.com ([209.226.137.86]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKTzqijtv86+QIgQTXTXoEfCLKnX3MPNX6@postini.com; Tue, 14 Feb 2012 10:06:09 PST Received: by hub6.qnx.com (Postfix, from userid 32767) id 313403464ED3; Tue, 14 Feb 2012 13:06:06 -0500 (EST) Received: from EXHTS1.ott.qnx.com (exhts1 [10.222.2.110]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by hub6.qnx.com (Postfix) with ESMTPS id 868473464ECA for ; Tue, 14 Feb 2012 13:06:04 -0500 (EST) Received: from [10.222.96.215] (10.222.96.215) by qnx.com (10.222.2.25) with Microsoft SMTP Server id 14.1.355.2; Tue, 14 Feb 2012 13:04:49 -0500 Message-ID: <4F3AA28A.6090501@qnx.com> Date: Tue, 14 Feb 2012 18:06:00 -0000 From: Aleksandar Ristovski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 Newsgroups: gmane.comp.gdb.patches CC: Subject: Re: [patch] Assert when 'break' with no arguments References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00275.txt.bz2 Message-ID: <20120214180600.q5EspcLQr3KrgW9DCm4WNYl-CFdnqUs02JEcwFZhptM@z> Please disregard line "# This file was written by Rob Savoye. (rob@cygnus.com)" from the test, I will remove it before commit. Sorry about that. On 12-02-14 01:02 PM, Aleksandar Ristovski wrote: > Hello, > > An issue exists where if 'break' command is issued while on a line that > underwent inlining by the compiler gdb asserts with > > Assertion `sal.pspace != NULL' > > I narrowed down the issue to frame.c:find_frame_sal, combined with > stack.c:set_last_displayed_sal and in the view of print_frame_info. > > The fix proposed here would be to properly initialize 'sal' in > find_frmae_sal. Additional check is performed in set_last_displayed_sal > to make sure we do not set last_displayed_* vars and validate them if > pspace is NULL as, clearly, the rest of the code expects it to be > properly set. > > I identified the same issue in 7.2, 7.3.1, 7.4 and HEAD. I have not > checked earlier versions. > > Test suite did not show regressions, and new test passes where it would > fail without the patch. > > > ChangeLog: > 2012-02-14 Aleksandar Ristovski > > * frame.c (find_frame_sal): Initialise sal->pspace field from frame data. > * stack.c (set_last_displayed_sal): Perform sanity check of the data > passed in, in particular, validate that PSPACE is not NULL if requesting > valid last_displayed_* data. > > > Test suite ChangeLOg: > 2012-02-14 Aleksandar Ristovski > > * gdb.base/break-inline.exp: New test. > * gdb.base/break-inline.c: New test. > > > Attached are patch for the fix and tests. > > > > Thank you, > > Aleksandar Ristovski > QNX Software Systems