[Patch, Fortran] PR fortran/40850 derived type allocatables freed before their components
Manfred Schwarb
manfred99@gmx.ch
Tue Feb 22 23:03:00 GMT 2011
Am 22.02.2011 23:07, schrieb Mikael Morin:
> 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).
>
It would be easy to just set MALLOC_CHECK_=1 and MALLOC_PERTURB_=B for
the testsuite runs. Per default or by a special makefile argument.
Covers only glibc, but all the same.
Or does this not help to catch these memory issues?
Cheers,
Manfred
More information about the Fortran
mailing list