This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45451] [OOP] Inconsistent status of ALLOCATABLE components inside CLASS variables.
- From: "sfilippone at uniroma2 dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2010 19:20:57 -0000
- Subject: [Bug fortran/45451] [OOP] Inconsistent status of ALLOCATABLE components inside CLASS variables.
- References: <bug-45451-9410@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from sfilippone at uniroma2 dot it 2010-08-31 19:20 -------
(In reply to comment #7)
> (In reply to comment #6)
>
> Fine. Waiting for it....
>
Consider the following variation: upon exit from DOIT, the ACSR variable should
be deallocated (since it was MOVE_ALLOCed to atx%a) but it is not, hence double
free.
===============================================================================
[sfilippo@localhost bug23]$ ./bug23_1
Allocation status acsr: T
Allocation status atx: T T T
1 3 4 5
1 1 2 3 0 0
0 0 0 0 0 0
1.0000000000000000 1.0000000000000000 2.0000000000000000
3.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 0.0000000000000000
*** glibc detected *** ./bug23_1: double free or corruption (!prev):
0x00000000023bbfe0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3d69675676]
./bug23_1[0x401876]
./bug23_1[0x4018da]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x3d6961ec5d]
./bug23_1[0x400869]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:05 2187330
/home/sfilippo/NUMERICAL/NewPSBLAS/GNUbugs/bug23/bug2
........................
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45451