public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
To: Mikael Morin <mikael.morin@sfr.fr>
Cc: fortran@gcc.gnu.org, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR fortran/50050 out of bounds whilst freeing an allocate-object.
Date: Sun, 21 Aug 2011 21:50:00 -0000	[thread overview]
Message-ID: <4E5121F2.50605@net-b.de> (raw)
In-Reply-To: <201108121606.32012.mikael.morin@sfr.fr>

Am 12.08.2011 16:06, schrieb Mikael Morin:
> This fixes an ICE triggered by resolve.c's gfc_expr_to_initialize reseting a
> range array ref into a full array ref, updating the rank, but leaving the
> shape as is, which eventually leads to an out of bound error.
>
> The right fix would probably be to avoid this kind of tricks. But I don't know
> what a patch impleting that would look like.
>
> This patch instead keeps the trick as is. It just frees the shape and re-
> resolves the expression, so that rank and shape are updated. It also does a
> bit of refactoring about shape freeing.
>
> I think it should be on the safe side, and I'm testing it on x86_64-unknown-
> freebsd8.2. OK for trunk if it passes? What about the branches? It is not a
> regression, but it looks like a genuine bug.

OK for the trunk; I am fine with backporting to branches, if you think 
it make sense.

Tobias

  reply	other threads:[~2011-08-21 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 15:17 Mikael Morin
2011-08-21 21:50 ` Tobias Burnus [this message]
2011-08-19 12:50 Dominique Dhumieres

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=4E5121F2.50605@net-b.de \
    --to=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikael.morin@sfr.fr \
    /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).