From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16760 invoked by alias); 13 Apr 2015 18:32:07 -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 16744 invoked by uid 89); 13 Apr 2015 18:32:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ig0-f169.google.com Received: from mail-ig0-f169.google.com (HELO mail-ig0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 13 Apr 2015 18:32:06 +0000 Received: by iget9 with SMTP id t9so61037044ige.1; Mon, 13 Apr 2015 11:32:03 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.43.95.71 with SMTP id cb7mr4667573icc.71.1428949923705; Mon, 13 Apr 2015 11:32:03 -0700 (PDT) Received: by 10.36.37.66 with HTTP; Mon, 13 Apr 2015 11:32:03 -0700 (PDT) In-Reply-To: <552AE99E.5030802@charter.net> References: <552AE99E.5030802@charter.net> Date: Mon, 13 Apr 2015 18:32:00 -0000 Message-ID: Subject: Re: [patch, libgfortran] PR65089 FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address From: Janne Blomqvist To: Jerry DeLisle Cc: gfortran , gcc patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-04/txt/msg00607.txt.bz2 On Mon, Apr 13, 2015 at 12:54 AM, Jerry DeLisle wro= te: > Hi all, > > The attached patch fixes this bug. It also eliminates non-freed memory > whenever > a format error occurs. Particular important when the user has use IOSTAT > and generate_error does not exit, but returns to continue program executi= on. > > Regression tested on x86-64 and tested with -fsanitize=3Daddress and valg= rind > on a number of existing test cases. Changelog is fairly clear I think. > > OK for trunk? Instead of xmalloc + memcpy + null-terminating, please use fc_strdup (or fc_strdup_notrim if you want to retain trailing spaces) in order to create a heap-allocated null-terminated copy of a non-null-terminated string. WIth that change, Ok for trunk and affected branches. Since it doesn't seem to be =C3=BCber-critical, I suggest you wait with backporting to the 5.x branch until after the imminent release of 5.1 (if I understand the new numbering scheme correctly). Thanks. --=20 Janne Blomqvist