From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28700 invoked by alias); 17 Sep 2014 22:23:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28681 invoked by uid 89); 17 Sep 2014 22:23:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qg0-f44.google.com Received: from mail-qg0-f44.google.com (HELO mail-qg0-f44.google.com) (209.85.192.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 17 Sep 2014 22:23:42 +0000 Received: by mail-qg0-f44.google.com with SMTP id z107so26405qgd.3 for ; Wed, 17 Sep 2014 15:23:39 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.130.7 with SMTP id q7mr791382qas.42.1410992619858; Wed, 17 Sep 2014 15:23:39 -0700 (PDT) Received: by 10.140.32.5 with HTTP; Wed, 17 Sep 2014 15:23:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 17 Sep 2014 22:23:00 -0000 Message-ID: Subject: Re: [PR libfortran/62768] Handle filenames with embedded nulls From: Janne Blomqvist To: Hans-Peter Nilsson Cc: FX , Fortran List , GCC Patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-09/txt/msg01425.txt.bz2 On Thu, Sep 18, 2014 at 12:57 AM, Hans-Peter Nilsson wrote: > On Thu, 18 Sep 2014, Janne Blomqvist wrote: >> On Wed, Sep 17, 2014 at 11:36 PM, Hans-Peter Nilsson wrote: >> > On the other hand, the tree *is* broken for some ports; I'd >> > prefer regressions to that. So, unless you're onto this, how do >> > you feel about me committing the posted patch and opening a PR >> > for the regressions? >> >> I committed >> >> Index: inquire.c >> =================================================================== >> --- inquire.c (revision 215337) >> +++ inquire.c (working copy) >> @@ -92,9 +92,9 @@ inquire_via_unit (st_parameter_inquire * >> else if (u->unit_number == options.stderr_unit) >> fstrcpy (iqp->name, iqp->name_len, "CONERR$", sizeof("CONERR$")); >> else >> - fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); >> + cf_strcpy (iqp->name, iqp->name_len, u->filename); >> #else >> - fstrcpy (iqp->name, iqp->name_len, u->file, u->file_len); >> + cf_strcpy (iqp->name, iqp->name_len, u->filename); >> #endif >> } >> >> as obvious (r215338). > > (Bah, without the indentation fixed...) Fixed in r215340. :) > 'k so we'll track the regressions in a PR. Do you prefer to tack on to 62768 or a new PR? Note that the r215338 fix only applies when using INQUIRE(...NAME=...), so I don't think manually disabling HAVE_TTYNAME{_R} helps in finding the cause of the regressions, while I haven't gone through every testcase you mentioned none of the few ones I did check inquired for the name. So there must be something else. Can you check where it's actually failing? Is it failing the testcase (call abort() ) or is there a segfault etc.? I suggest trying e.g. gfortran.dg/inquire.f90 which is quite a simple testcase. -- Janne Blomqvist