From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11738 invoked by alias); 7 Feb 2013 19:15:41 -0000 Received: (qmail 11705 invoked by uid 22791); 7 Feb 2013 19:15:39 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_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; Thu, 07 Feb 2013 19:15:20 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r17JFJfM022339 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 7 Feb 2013 14:15:19 -0500 Received: from host2.jankratochvil.net (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r17JFFVn026149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 7 Feb 2013 14:15:18 -0500 Date: Thu, 07 Feb 2013 19:15:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: fix PR symtab/11464 Message-ID: <20130207191514.GA24179@host2.jankratochvil.net> References: <87hamovmu7.fsf@fleche.redhat.com> <20130203054502.GB16948@host2.jankratochvil.net> <871ucw2g4p.fsf@fleche.redhat.com> <87fw1bzr8m.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87fw1bzr8m.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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-02/txt/msg00188.txt.bz2 On Mon, 04 Feb 2013 22:47:05 +0100, Tom Tromey wrote: > Jan> I do not see there a regression; this does not mean much for c-exp.y. > > Tom> I'll look. > Tom> It may be more visible under valgrind. > > For me it reliably fails the 'ptype': > > (gdb) ptype gnu_obj_1::'~gnu_obj_1' > Segmentation fault (core dumped) I really have the full testsuite without regressions. I do not see why it crashes for you. Tried on Fedora Rawhide, both with -lmcheck and without -lmcheck. This case gnu_obj_1::'~gnu_obj_1' does not get handled there as the parser parses it as: $1 = token TYPENAME () $2 = token COLONCOLON () $3 = nterm name () and when it sees '~gnu_obj_1' classify_inner_name returns ERROR. Without these two lines: if (classification == NAME) break; the loop goes again, last_was_coloncolon == 0 in if (next.token == NAME && last_was_coloncolon) So it just stores back the fetched next token /* We've reached the end of the name. */ VEC_safe_push (token_and_value, token_fifo, &next); and also does "break;". So I still believe those two lines if (classification == NAME) break; are just some cleanup/simplification but not required by this patch. Thanks, Jan