From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38606 invoked by alias); 16 Feb 2016 08:06:25 -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 38564 invoked by uid 89); 16 Feb 2016 08:06:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=U*blomqvist.janne, blomqvistjannegmailcom, sk:blomqvi, blomqvist.janne@gmail.com X-HELO: mail-qg0-f45.google.com Received: from mail-qg0-f45.google.com (HELO mail-qg0-f45.google.com) (209.85.192.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 16 Feb 2016 08:06:22 +0000 Received: by mail-qg0-f45.google.com with SMTP id b67so127507836qgb.1 for ; Tue, 16 Feb 2016 00:06:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=hndFHNcRo55qQSeoDJk1di9ypfSYr9vGjh95jiUUxJI=; b=Emc3/eKai4KvaDfbUdDpCw9+zIGAoO6LgO/tSSEC4/QjVT1pBSeyXqtxOUyjW5EHtf 4KXFlFvuNqfNPrR3tKGJu0OqnRUVMieBGnfJRu/8+uJOPBQXZqDJxXHdRRSR6iLNU5t3 tDS1ldLPRmMK7EkmguhtSZrGMeISvsX0JbTuWKKgR9zTMfWZeXQBBoGlQ9mCWYf4iBtA vM9g28nIgGgoaRna82wDOBVMxrqUVP651dqwA11Gn2BBy7TcDzJDUTUX2FzD5/bkPhRr yhs56y5Zf0CF1e8cHvnVmNk0WrMf3HX/Nq/zD371QWmw9j+R1jVE9w8TITtWiO1xAAjX yHSA== X-Gm-Message-State: AG10YOQD7W6yPVxX9pfiiAgoONH573vyCVoT4jmycR0P/ewu3B3FH5MdoJKO7HifOGJ9PmhSMTUw8g9tKpP9ljgn MIME-Version: 1.0 X-Received: by 10.140.22.139 with SMTP id 11mr26083862qgn.34.1455609980167; Tue, 16 Feb 2016 00:06:20 -0800 (PST) Received: by 10.140.90.84 with HTTP; Tue, 16 Feb 2016 00:06:20 -0800 (PST) In-Reply-To: References: <56C246EB.4050104@charter.net> Date: Tue, 16 Feb 2016 08:06:00 -0000 Message-ID: Subject: Re: [6 Regession] Usage of unitialized pointer io/list_read.c ( From: Christophe Lyon To: Janne Blomqvist Cc: Jerry DeLisle , gfortran , gcc patches Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-02/txt/msg00059.txt.bz2 On 15 February 2016 at 23:16, Janne Blomqvist wrote: > On Mon, Feb 15, 2016 at 11:45 PM, Jerry DeLisle wrote: >> The title of the PR should be "Mishandling of namelist comments" or >> "Interpreting '!' as a comment in non-namelist reads". >> >> The attached patch fixes the regression by reverting the previous attempt at >> namelist comments that used only CASE_SEPARATOR to enable comments in namelists. >> The approach now is to test specifically for '!' in each type of read various >> functions. If in namelist mode the respective case falls through to the handling >> of separators which eats the line when a '!' is found. Otherwise, the read is >> determined to be bad and an error is issued. >> >> Since the reporter of this PR noticed something screwy with the 'new' pointer in >> push_char4, I took a close look at the code and deleted it. I also heavily >> instrumented and tested this mechanism to grow the buffer and deleted the use of >> memset which was commented to not be needed. The 'new' was not being initialized >> and I think was a leftover from a previous edit and just missed. >> >> I added two new test cases in the patch. These test all the new error >> conditions. Also, read_bang4.f90 uses a large kind=4 string to exercise the >> buffer mechanism. Verification is through making sure what we read in matches >> what we wrote out to the test scratch file >> >> Regression tested on x86_64-Linux. OK for trunk? any thoughts on back porting >> to 5 since it fixes a potentially bad pointer problem in push_char4? > > Ok for both trunk and 5. > > Hi, Although OK in trunk, I've noticed regressions in the gcc-5 branch since you commtted r233442: - PASS now FAIL [PASS => FAIL]: gfortran.dg/namelist_38.f90 -O0 execution test gfortran.dg/namelist_38.f90 -O1 execution test gfortran.dg/namelist_38.f90 -O2 execution test gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer execution test gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test gfortran.dg/namelist_38.f90 -O3 -fomit-frame-pointer -funroll-loops execution test gfortran.dg/namelist_38.f90 -O3 -g execution test gfortran.dg/namelist_38.f90 -Os execution test gfortran.dg/namelist_84.f90 -O0 execution test gfortran.dg/namelist_84.f90 -O1 execution test gfortran.dg/namelist_84.f90 -O2 execution test gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer execution test gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test gfortran.dg/namelist_84.f90 -O3 -fomit-frame-pointer -funroll-loops execution test gfortran.dg/namelist_84.f90 -O3 -g execution test gfortran.dg/namelist_84.f90 -Os execution test Looking at the logs, I can see: At line 33 of file /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/gfortran.dg/namelist_38.f90 (unit = 10, file = '/gfortrantmpzLPCW0') Fortran runtime error: Cannot match namelist object name a'a FAIL: gfortran.dg/namelist_38.f90 -O0 execution test At line 20 of file /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/gfortran.dg/namelist_84.f90 (unit = 10, file = '/gfortrantmpVWEbdK') Fortran runtime error: Cannot match namelist object name mon FAIL: gfortran.dg/namelist_84.f90 -O0 execution test I'm running the tests on arm* and aarch64* targets. Am I missing something? Thanks, Christophe. > -- > Janne Blomqvist