[Patch, Fortran] PR60576 Fix out-of-bounds problem

Tobias Burnus burnus@net-b.de
Thu Mar 27 20:45:00 GMT 2014


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.



More information about the Gcc-patches mailing list