From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28314 invoked by alias); 31 Aug 2010 19:21:08 -0000 Received: (qmail 28282 invoked by uid 48); 31 Aug 2010 19:20:57 -0000 Date: Tue, 31 Aug 2010 19:21:00 -0000 Message-ID: <20100831192057.28281.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/45451] [OOP] Inconsistent status of ALLOCATABLE components inside CLASS variables. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sfilippone at uniroma2 dot it" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg02588.txt.bz2 ------- 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