From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102120 invoked by alias); 30 Jan 2020 17:50:05 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 102096 invoked by uid 89); 30 Jan 2020 17:50:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:2458D86, H*f:sk:2458D86, H*i:sk:2458D86 X-HELO: mail-pj1-f67.google.com Received: from mail-pj1-f67.google.com (HELO mail-pj1-f67.google.com) (209.85.216.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Jan 2020 17:50:01 +0000 Received: by mail-pj1-f67.google.com with SMTP id m13so1662898pjb.2; Thu, 30 Jan 2020 09:50:01 -0800 (PST) Return-Path: Received: from andrew-precision-3520.localnet (pool-239.obs.carnegiescience.edu. [192.91.178.239]) by smtp.gmail.com with ESMTPSA id g8sm7209625pfh.43.2020.01.30.09.49.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jan 2020 09:49:59 -0800 (PST) From: Andrew Benson To: Bernhard Reutner-Fischer Cc: fortran@gcc.gnu.org, Jerry DeLisle , GCC Patches Subject: Re: [patch, fortan] PR87103 - [OOP] ICE in gfc_new_symbol() due to overlong symbol name Date: Thu, 30 Jan 2020 17:50:00 -0000 Message-ID: <2369568.H31sJ7Ft8y@andrew-precision-3520> User-Agent: KMail/5.2.3 (Linux/4.4.0-170-generic; KDE/5.36.0; x86_64; ; ) In-Reply-To: <2458D863-B626-41B1-BF78-9C47C9B42275@gmail.com> References: <1642803.1Q0mUWRIpW@andrew-precision-3520> <4506052.Qmi2vVopNV@andrew-precision-3520> <2458D863-B626-41B1-BF78-9C47C9B42275@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00157.txt.bz2 Thanks Bernhard - this is now committed: https://gcc.gnu.org/g:004ac7b780308dc899e565b887c7def0a6e100f2 On Thursday, January 30, 2020 5:27:55 PM PST Bernhard Reutner-Fischer wrote: > On 29 January 2020 21:19:52 CET, Andrew Benson wrote: > >I think this patch is still waiting to be applied. I checked that it > >applies > >against trunk (with line offsets) and reg tests cleanly and posted an > >updated > >version (diff'd against current trunk) at: > > > >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87103#c7 > > > >I'm happy to go ahead and commit this if Bernhard is ok with me doing > >so. > > Please go ahead and push it. > Many thanks in advance and sorry for the delay! > thanks, > > >-Andrew > > > >On Wednesday, August 28, 2019 9:00:36 PM PST Bernhard Reutner-Fischer > > > >wrote: > >> On Fri, 23 Aug 2019 17:17:37 -0700 > >> > >> Andrew Benson wrote: > >> > This PR is still open - I re-tested the patch on the current trunk. > > > >The > > > >> > patch still applies with some line offsets (I've attached the > > > >updated > > > >> > patch) and regtests cleanly. It would be very helpful to me to get > > > >this > > > >> > patch committed if possible. > >> > >> I think Jerry ACKed the patch back then. I'll try to find the time to > >> commit it maybe during one of the coming weekends unless someone else > >> beats me to it.. > >> > >> Thanks for the reminder! > >> Bernhard > >> > >> > Thanks, > >> > Andrew > >> > > >> > On Wednesday, September 5, 2018 12:35:04 PM PDT Bernhard > > > >Reutner-Fischer > > > >> > wrote: > >> > > On Wed, 5 Sep 2018 at 03:30, Jerry DeLisle > > > > > > > >wrote: > >> > > > On 09/04/2018 10:43 AM, Bernhard Reutner-Fischer wrote: > >> > > > > On Tue, 4 Sep 2018 at 18:43, Andrew Benson > >> > > > > > >> > > >> > wrote: > >> > > > >> As suggested by Janus, PR87103 is easily fixed by the > > > >attached > > > >> > > > >> patch > >> > > > >> which > >> > > > >> increases GFC_MAX_SYMBOL_LEN to 76 (sufficient to hold the > > > >maximum > > > >> > > > >> allowed F08 symbol length of 63, plus a null terminator, > > > >plus the > > > >> > > > >> "__tmp_class_" prefix).> > > >> > > > > > >> > > > > This is so much wrong. > >> > > > > Note that this will be fixed properly by the changes > > > >contained in > > > >> > > > > the > > > >https://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/aldot/for > > > >> > > > > tran > >> > > > > -fe-stringpool branch. > >> > > > > There we keep the GFC_MAX_SYMBOL_LEN at 63 proper but use an > >> > > > > internal > >> > > > > buffer double that size which in turn is sufficient to hold > > > >all > > > >> > > > > compiler-generated identifiers. > >> > > > > See gfc_get_string() even in current TOT. > >> > > > > > >> > > > > Maybe we should bite the bullet and start to merge the > > > >stringpool > > > >> > > > > changes now instead of this hack? > >> > > > > >> > > > It all makes sense to me, please proceed. (my 2 cents worth) > >> > > > >> > > Ok so i will reread the fortran-fe-stringpool series and submit > > > >it > > > >> > > here for review. > >> > > > >> > > Let's return to the issue at hand for a moment, though. > >> > > I tested the attached alternate fix on top of the > >> > > fortran-fe-stringpool branch where it fixes PR87103. > >> > > Maybe somebody has spare cycles to test it on top of current > > > >trunk? > > > >> > > thanks, > >> > > > >> > > [PATCH,FORTRAN] PR87103: Remove max symbol length check from > >> > > gfc_new_symbol > >> > > > >> > > gfc_match_name does check for too long names already. Since > >> > > gfc_new_symbol is also called for symbols with internal names > > > >containing > > > >> > > compiler-generated prefixes, these internal names can easily > > > >exceed the > > > >> > > max_identifier_length mandated by the standard. > >> > > > >> > > gcc/fortran/ChangeLog > >> > > > >> > > 2018-09-04 Bernhard Reutner-Fischer > >> > > > >> > > PR fortran/87103 > >> > > * expr.c (gfc_check_conformance): Check vsnprintf for truncation. > >> > > * iresolve.c (gfc_get_string): Likewise. > >> > > * symbol.c (gfc_new_symbol): Remove check for maximum symbol > >> > > name length. Remove redundant 0 setting of new calloc()ed > >> > > gfc_symbol. -- * Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html * Galacticus: https://github.com/galacticusorg/galacticus