public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/93624] Memory leak with allocatable
       [not found] <bug-93624-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-05  7:49 ` juan.dominguez at eveutilities dot com
  2020-06-05  7:50 ` juan.dominguez at eveutilities dot com
  2020-06-09 10:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 3+ messages in thread
From: juan.dominguez at eveutilities dot com @ 2020-06-05  7:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93624

Juan Javier Dominguez Moreno <juan.dominguez at eveutilities dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juan.dominguez@eveutilities
                   |                            |.com

--- Comment #1 from Juan Javier Dominguez Moreno <juan.dominguez at eveutilities dot com> ---
Created attachment 48682
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48682&action=edit
Memory leak when returning an allocatable derived type

deallocate_test.f08

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/93624] Memory leak with allocatable
       [not found] <bug-93624-4@http.gcc.gnu.org/bugzilla/>
  2020-06-05  7:49 ` [Bug fortran/93624] Memory leak with allocatable juan.dominguez at eveutilities dot com
@ 2020-06-05  7:50 ` juan.dominguez at eveutilities dot com
  2020-06-09 10:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 3+ messages in thread
From: juan.dominguez at eveutilities dot com @ 2020-06-05  7:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93624

--- Comment #2 from Juan Javier Dominguez Moreno <juan.dominguez at eveutilities dot com> ---
Hello,

I ran into the same problem using:

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl
--with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit
--enable-cet=auto --enable-checking=release --enable-clocale=gnu
--enable-default-pie --enable-default-ssp --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id
--enable-lto --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-libunwind-exceptions --disable-werror
gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.0 (GCC) 

The example is in the attached file "deallocate_test.f08".

The address sanitizer output is:

=================================================================
==17194==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7f6c75f26459 in __interceptor_malloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x5591e02303fe in create_container_leak
/home/juan/temp/deallocate_test.f08:57
    #2 0x5591e0231136 in do_leak /home/juan/temp/deallocate_test.f08:42
    #3 0x5591e0230277 in deallocate_test /home/juan/temp/deallocate_test.f08:34
    #4 0x5591e0231667 in main /home/juan/temp/deallocate_test.f08:30
    #5 0x7f6c75863001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f6c75f26459 in __interceptor_malloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x5591e022faf0 in __deallocate_test_mod_MOD_make_object
/home/juan/temp/deallocate_test.f08:21
    #2 0x5591e02304da in create_container_leak
/home/juan/temp/deallocate_test.f08:59
    #3 0x5591e0231136 in do_leak /home/juan/temp/deallocate_test.f08:42
    #4 0x5591e0230277 in deallocate_test /home/juan/temp/deallocate_test.f08:34
    #5 0x5591e0231667 in main /home/juan/temp/deallocate_test.f08:30
    #6 0x7f6c75863001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f6c75f26459 in __interceptor_malloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x5591e022faf0 in __deallocate_test_mod_MOD_make_object
/home/juan/temp/deallocate_test.f08:21
    #2 0x5591e022fea9 in create_container_no_leak
/home/juan/temp/deallocate_test.f08:66
    #3 0x5591e0230b55 in do_no_leak /home/juan/temp/deallocate_test.f08:50
    #4 0x5591e0230283 in deallocate_test /home/juan/temp/deallocate_test.f08:35
    #5 0x5591e0231667 in main /home/juan/temp/deallocate_test.f08:30
    #6 0x7f6c75863001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f6c75f26459 in __interceptor_malloc
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x5591e02305a9 in create_container_leak
/home/juan/temp/deallocate_test.f08:59
    #2 0x5591e0231136 in do_leak /home/juan/temp/deallocate_test.f08:42
    #3 0x5591e0230277 in deallocate_test /home/juan/temp/deallocate_test.f08:34
    #4 0x5591e0231667 in main /home/juan/temp/deallocate_test.f08:30
    #5 0x7f6c75863001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)

SUMMARY: AddressSanitizer: 40 byte(s) leaked in 4 allocation(s).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/93624] Memory leak with allocatable
       [not found] <bug-93624-4@http.gcc.gnu.org/bugzilla/>
  2020-06-05  7:49 ` [Bug fortran/93624] Memory leak with allocatable juan.dominguez at eveutilities dot com
  2020-06-05  7:50 ` juan.dominguez at eveutilities dot com
@ 2020-06-09 10:42 ` dominiq at lps dot ens.fr
  2 siblings, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-06-09 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93624

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-09
             Blocks|                            |86754

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed since GCC7.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86754
[Bug 86754] [meta-bug] Memory leaks at run time

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-09 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93624-4@http.gcc.gnu.org/bugzilla/>
2020-06-05  7:49 ` [Bug fortran/93624] Memory leak with allocatable juan.dominguez at eveutilities dot com
2020-06-05  7:50 ` juan.dominguez at eveutilities dot com
2020-06-09 10:42 ` dominiq at lps dot ens.fr

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