[Patch, Fortran] PR fortran/40850 derived type allocatables freed before their components

Mikael Morin mikael.morin@sfr.fr
Tue Feb 22 22:07:00 GMT 2011


On Tuesday 22 February 2011 16:39:26 Dominique Dhumieres wrote:
> I have run the test with 1024*1024 through valgrind. Without the patch I
> get
> 
> ...
> ==33241== Invalid read of size 8
> ==33241==    at 0x100000C48: MAIN__ (pr40850_2_db.f90:8)
> ==33241==    by 0x100000D82: main (pr40850_2_db.f90:8)
> ==33241==  Address 0x106840040 is not stack'd, malloc'd or (recently)
> free'd ==33241==
> ==33241== Invalid write of size 8
> ==33241==    at 0x100000C89: MAIN__ (pr40850_2_db.f90:8)
> ==33241==    by 0x100000D82: main (pr40850_2_db.f90:8)
> ==33241==  Address 0x106840040 is not stack'd, malloc'd or (recently)
> free'd ...
> ==33241== ERROR SUMMARY: 2097152 errors from 2 contexts (suppressed: 0 from
> 0)
> 
> with the patch I get:
> 
> ...
> ==33249== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
> 
> Dominique

Yeah, this is what the patch is supposed to fix. 
The problem is there is no valgrind in the testsuite, and I would like a 
testcase able to fail in the testsuite (thus without the help of valgrind). 



More information about the Fortran mailing list