This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR60576 Fix out-of-bounds problem
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Fri, 28 Mar 2014 12:30:10 +0100
- Subject: Re: [Patch, Fortran] PR60576 Fix out-of-bounds problem
- Authentication-results: sourceware.org; auth=none
- References: <5330C6E0 dot 4040103 at net-b dot de> <533484A1 dot 3060309 at net-b dot de>
Dear Tobias,
This is, of course, fine since it is 'obvious' (in my opinion at least).
Thanks for the patch
Paul
On 27 March 2014 21:05, Tobias Burnus <burnus@net-b.de> wrote:
> An early * PING* for this wrong-code issue.
>
>
> Tobias Burnus wrote:
>>
>> This patch fixes part of the problems of the PR. The problem is that one
>> assigns an array descriptor to an assumed-rank array descriptor. The latter
>> has for BT_CLASS the size of max_dim (reason: we have first the "data" array
>> and than "vtab"). With "true", one takes the TREE_TYPE from the LHS (i.e.
>> the assumed-rank variable) and as the type determines how many bytes the
>> range assignment copies, one reads max_dimension elements from the RHS array
>> - which can be too much.
>>
>> Testcase: Already in the testsuite, even if it only fails under special
>> conditions.
>>
>> Build and regtested on x86-64-gnu-linux.
>> OK for the trunk and 4.8?
>>
>> Tobias
>>
>> PS: I haven't investigated the issues Jakub is seeing. With valgrind, they
>> do not pop up and my attempt to build with all checking enabled, failed with
>> configure or compile errors.
>
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy