public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sfilippone at uniroma2 dot it" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/48700] New: [OOP] memory leak with  MOVE_ALLOC  of polymorphic variables
Date: Wed, 20 Apr 2011 12:10:00 -0000	[thread overview]
Message-ID: <bug-48700-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48700

           Summary: [OOP] memory leak with  MOVE_ALLOC  of polymorphic
                    variables
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sfilippone@uniroma2.it


Created attachment 24058
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24058
test-case

Running the attached test case through valgrind gives memory leak warnings,
both with current trunk and 4.6.0

----------------------------------------------------------------------------
[sfilippo@donald bug31]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu47/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu47
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc :
(reconfigured) ../gcc/configure --prefix=/usr/local/gnu47
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc :
(reconfigured) ../gcc/configure --prefix=/usr/local/gnu47
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
Thread model: posix
gcc version 4.7.0 20110418 (experimental) (GCC) 
[sfilippo@donald bug31]$ gfortran -o testmv3 testmv3.f90 -ggdb 
[sfilippo@donald bug31]$ valgrind --leak-check=full ./testmv3
==25909== Memcheck, a memory error detector
==25909== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==25909== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==25909== Command: ./testmv3
==25909== 
==25909== 
==25909== HEAP SUMMARY:
==25909==     in use at exit: 216 bytes in 4 blocks
==25909==   total heap usage: 26 allocs, 22 frees, 12,368 bytes allocated
==25909== 
==25909== 40 bytes in 1 blocks are definitely lost in loss record 3 of 4
==25909==    at 0x4A05E46: malloc (vg_replace_malloc.c:195)
==25909==    by 0x401425: MAIN__ (testmv3.f90:37)
==25909==    by 0x401729: main (testmv3.f90:22)
==25909== 
==25909== 176 (96 direct, 80 indirect) bytes in 1 blocks are definitely lost in
loss record 4 of 4
==25909==    at 0x4A05E46: malloc (vg_replace_malloc.c:195)
==25909==    by 0x400DCF: MAIN__ (testmv3.f90:30)
==25909==    by 0x401729: main (testmv3.f90:22)
==25909== 
==25909== LEAK SUMMARY:
==25909==    definitely lost: 136 bytes in 2 blocks
==25909==    indirectly lost: 80 bytes in 2 blocks
==25909==      possibly lost: 0 bytes in 0 blocks
==25909==    still reachable: 0 bytes in 0 blocks
==25909==         suppressed: 0 bytes in 0 blocks
==25909== 
==25909== For counts of detected and suppressed errors, rerun with: -v
==25909== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 6)


             reply	other threads:[~2011-04-20 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 12:10 sfilippone at uniroma2 dot it [this message]
2011-05-15 10:45 ` [Bug fortran/48700] " janus at gcc dot gnu.org
2011-05-15 11:35 ` [Bug fortran/48700] memory leak with MOVE_ALLOC janus at gcc dot gnu.org
2011-05-15 12:43 ` janus at gcc dot gnu.org
2011-05-15 13:44 ` janus at gcc dot gnu.org
2011-05-15 17:56 ` janus at gcc dot gnu.org
2011-05-15 22:32 ` janus at gcc dot gnu.org
2011-05-18 19:12 ` janus at gcc dot gnu.org
2011-05-18 20:13 ` janus at gcc dot gnu.org
2011-11-29 10:02 ` burnus at gcc dot gnu.org
2011-11-29 10:04 ` burnus at gcc dot gnu.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=bug-48700-4@http.gcc.gnu.org/bugzilla/ \
    --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).