public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janne Blomqvist <blomqvist.janne@gmail.com>
To: Jerry DeLisle <jvdelisle@charter.net>
Cc: gfortran <fortran@gcc.gnu.org>, gcc patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, libgfortran] PR65089 FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address
Date: Mon, 13 Apr 2015 18:32:00 -0000	[thread overview]
Message-ID: <CAO9iq9HbTTh0R9NTk_4+c8jvPWVXiJBkyJK1qU41x5geMNuW9w@mail.gmail.com> (raw)
In-Reply-To: <552AE99E.5030802@charter.net>

On Mon, Apr 13, 2015 at 12:54 AM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> 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 execution.
>
> Regression tested on x86-64 and tested with -fsanitize=address and valgrind
> 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 über-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.

-- 
Janne Blomqvist

      reply	other threads:[~2015-04-13 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12 21:54 Jerry DeLisle
2015-04-13 18:32 ` Janne Blomqvist [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO9iq9HbTTh0R9NTk_4+c8jvPWVXiJBkyJK1qU41x5geMNuW9w@mail.gmail.com \
    --to=blomqvist.janne@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jvdelisle@charter.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).