From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17336 invoked by alias); 11 Feb 2013 20:58:31 -0000 Received: (qmail 17313 invoked by uid 22791); 11 Feb 2013 20:58:29 -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,TW_YY 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; Mon, 11 Feb 2013 20:58:21 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1BKwLk4001269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 11 Feb 2013 15:58:21 -0500 Received: from host2.jankratochvil.net (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1BKwHfw026765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 11 Feb 2013 15:58:20 -0500 Date: Mon, 11 Feb 2013 20:58:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: fix PR symtab/11464 Message-ID: <20130211205816.GA26770@host2.jankratochvil.net> References: <87hamovmu7.fsf@fleche.redhat.com> <20130203054502.GB16948@host2.jankratochvil.net> <871ucw2g4p.fsf@fleche.redhat.com> <87fw1bzr8m.fsf@fleche.redhat.com> <20130207191514.GA24179@host2.jankratochvil.net> <87zjzappd6.fsf@fleche.redhat.com> <20130211203930.GA26149@host2.jankratochvil.net> <87sj52poky.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sj52poky.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/msg00260.txt.bz2 On Mon, 11 Feb 2013 21:45:01 +0100, Tom Tromey wrote: > Jan> That's true, that crashes even for me. I still expected it crashes > Jan> for you if you remove the two lines: > Jan> if (classification == NAME) > Jan> break; > Jan> which cannot / does not crash. > > I thought you were reporting that the test case did not crash before the > fix. > > Now I don't understand what you are saying here. It does not matter but the whole time I was trying to say this does not crash for me: --- ./gdb/c-exp.y-x 2013-02-11 21:53:30.837153125 +0100 +++ ./gdb/c-exp.y 2013-02-11 21:53:44.947170669 +0100 @@ -2986,8 +2986,8 @@ yylex (void) last_was_coloncolon = 0; - if (classification == NAME) - break; +// if (classification == NAME) +// break; context_type = yylval.tsym.type; } > >> I guess you are saying I should invert the if. > >> Ok, I will do that. > > Jan> No, I did not mean that. In fact I do not understand much what condition > Jan> inversion do you mean. > > I mean now the patch reads: > > if (classification != NAME) > context_type = yylval.tsym.type; > > This still fixes the failing test case, but I haven't run it through a > complete regression test yet. In such case there should be: if (classification != NAME) context_type = yylval.tsym.type; else context_type = NULL; Otherwise context_type could have "stale" content. But it has no effect on the executed code. I do not mind the patch form anymore, it was all just about the crashing / non-crashing misunderstanding. Thanks, Jan