From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15561 invoked by alias); 24 Apr 2009 08:55:03 -0000 Received: (qmail 15481 invoked by uid 48); 24 Apr 2009 08:54:51 -0000 Date: Fri, 24 Apr 2009 08:55:00 -0000 Message-ID: <20090424085451.15480.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/39879] double free or corruption abort with gfortran In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dominiq at lps dot ens dot fr" 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: 2009-04/txt/msg02219.txt.bz2 ------- Comment #2 from dominiq at lps dot ens dot fr 2009-04-24 08:54 ------- Confirmed for gfortran 4.3.3, 4.4.0, and trunk; no error with 4.2.3. g95 0.91 gives: Setting bunch_params 113 113 Have set After 1st set Setting bunch_params 113 113 Have set End Remaining memory: 10848 bytes at 00800218 allocated at line 95 of pr39879.f90 Remaining memory: 60 bytes at 00100418 allocated at line 92 of pr39879.f90 Remaining memory: 224 bytes at 00100318 allocated at line 89 of pr39879.f90 Remaining memory: 60 bytes at 00100478 allocated at line 92 of pr39879.f90 Remaining memory: 10848 bytes at 00802e18 allocated at line 96 of pr39879.f90 and g95 0.92 (Apr 22 2009) ... End Remaining memory: 68 bytes at 001003b8 allocated at line 92 of pr39879.f90 Remaining memory: 228 bytes at 001002b8 allocated at line 89 of pr39879.f90 Remaining memory: 68 bytes at 00100418 allocated at line 92 of pr39879.f90 Remaining memory: 10848 bytes at 00802e18 allocated at line 96 of pr39879.f90 Adding the lines deallocate (u%model%bunch_params) deallocate (u%design%bunch_params) deallocate (u%design, u%model) deallocate (s%u) make g95 0.91 happy, g95 0.92 gives ... End At line 102 of file pr39879_db.f90 Traceback: not available, compile with -ftrace=frame or -ftrace=full Fortran runtime error: Deallocated a bad pointer gfortran 4.2.3 is also happy, while the other versions give ... Have set a.out(67213) malloc: *** error for object 0x809200: double free *** set a breakpoint in malloc_error_break to debug End a.out(67213) malloc: *** error for object 0x809200: double free *** set a breakpoint in malloc_error_break to debug -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39879