public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/39879] double free or corruption abort with gfortran
Date: Fri, 24 Apr 2009 08:55:00 -0000	[thread overview]
Message-ID: <20090424085451.15480.qmail@sourceware.org> (raw)
In-Reply-To: <bug-39879-17588@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2009-04-24  8:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24  6:35 [Bug fortran/39879] New: " david dot sagan at gmail dot com
2009-04-24  6:36 ` [Bug fortran/39879] " david dot sagan at gmail dot com
2009-04-24  8:55 ` dominiq at lps dot ens dot fr [this message]
2009-04-24 13:06 ` david dot sagan at gmail dot com
2009-04-24 14:17 ` kargl at gcc dot gnu dot org
2009-04-24 14:27 ` david dot sagan at gmail dot com
2009-04-24 17:59 ` kargl at gcc dot gnu dot org
2009-04-24 18:00 ` kargl at gcc dot gnu dot org
2009-04-24 22:03 ` [Bug fortran/39879] [4.3/4.4/4.5 Regression] " burnus at gcc dot gnu dot org
2009-04-25 18:06 ` pault at gcc dot gnu dot org
2009-04-26 16:50 ` pault at gcc dot gnu dot org
2009-04-26 19:22 ` pault at gcc dot gnu dot org
2009-04-28  5:16 ` pault at gcc dot gnu dot org
2009-04-28  5:30 ` pault at gcc dot gnu dot org
2009-04-28  6:07 ` [Bug fortran/39879] [4.3/4.4 " pault at gcc dot gnu dot org
2009-05-10 10:44 ` pault at gcc dot gnu dot org
2009-05-10 16:09 ` pault at gcc dot gnu dot org
2009-05-10 16:10 ` pault at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090424085451.15480.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).