[Patch, fortran] PR fortran/50050 out of bounds whilst freeing an allocate-object.

Tobias Burnus burnus@net-b.de
Sun Aug 21 15:19:00 GMT 2011


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



More information about the Fortran mailing list