From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11321 invoked by alias); 8 Jan 2010 08:57:03 -0000 Received: (qmail 11311 invoked by uid 22791); 8 Jan 2010 08:57:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Jan 2010 08:56:54 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o088uU6n007093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Jan 2010 03:56:31 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o088uSJ2032402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 03:56:30 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o088uRpn008663; Fri, 8 Jan 2010 09:56:27 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o088uRUd008660; Fri, 8 Jan 2010 09:56:27 +0100 Date: Fri, 08 Jan 2010 08:57:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix crash reading broken stabs Message-ID: <20100108085626.GA8326@host0.dyn.jankratochvil.net> References: <20100107175054.GA15215@host0.dyn.jankratochvil.net> <20100108073806.GB29312@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100108073806.GB29312@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2010-01/txt/msg00158.txt.bz2 On Fri, 08 Jan 2010 08:38:06 +0100, Joel Brobecker wrote: > Both OK. If you don't mind, could you add just a tiny bit of > information in the comment you added in weird.def? Something > like: > > # See read_args "Invalid (empty) method arguments" error > # (there is an unexpected semi-colon after =@s8;-16 that > # used to cause a GDB crash). OK: +# See read_args "Invalid (empty) method arguments" error; there is an +# unexpected semi-colon after =@s8;-16 that used to cause a GDB crash. Checked-in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2010-01/msg00059.html --- src/gdb/ChangeLog 2010/01/08 07:16:43 1.11208 +++ src/gdb/ChangeLog 2010/01/08 08:55:15 1.11209 @@ -1,3 +1,7 @@ +2010-01-09 Jan Kratochvil + + * stabsread.c (read_args): Handle zero arguments. + 2009-01-08 Joel Brobecker Cannot find in-tree libiconv.a after reconfigure. --- src/gdb/stabsread.c 2010/01/01 07:31:42 1.122 +++ src/gdb/stabsread.c 2010/01/08 08:55:16 1.123 @@ -4111,7 +4111,17 @@ } (*pp)++; /* get past `end' (the ':' character) */ - if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID) + if (n == 0) + { + /* We should read at least the THIS parameter here. Some broken stabs + output contained `(0,41),(0,42)=@s8;-16;,(0,43),(0,1);' where should + have been present ";-16,(0,43)" reference instead. This way the + excessive ";" marker prematurely stops the parameters parsing. */ + + complaint (&symfile_complaints, _("Invalid (empty) method arguments")); + *varargsp = 0; + } + else if (TYPE_CODE (types[n - 1]) != TYPE_CODE_VOID) *varargsp = 1; else { --- src/gdb/testsuite/ChangeLog 2010/01/07 23:26:39 1.2069 +++ src/gdb/testsuite/ChangeLog 2010/01/08 08:55:16 1.2070 @@ -1,3 +1,7 @@ +2010-01-09 Jan Kratochvil + + * gdb.stabs/weird.def (args93): New. + 2010-01-07 Doug Evans * lib/gdb.exp (gdb_skip_xml_test): Add comment. --- src/gdb/testsuite/gdb.stabs/weird.def 2001/11/06 00:31:59 1.2 +++ src/gdb/testsuite/gdb.stabs/weird.def 2010/01/08 08:55:16 1.3 @@ -880,3 +880,7 @@ .stabs "sym92:\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0,0,0 .stabs "type92:t92=\ !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",N_LSYM,0,0,0 .stabs "attr92:G392=@\ !#$%&'()*+,-./0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~;1",N_GSYM,0,0, 0 + +# See read_args "Invalid (empty) method arguments" error; there is an +# unexpected semi-colon after =@s8;-16 that used to cause a GDB crash. +.stabs "args93:G93=#(0,93),(0,93)=@s8;-16;,(0,93),(0,93);",N_GSYM,0,0,0