public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66339] New: g++ 5.1.0 Generates memory leak
@ 2015-05-29 22:35 etcwilde at uvic dot ca
  0 siblings, 0 replies; only message in thread
From: etcwilde at uvic dot ca @ 2015-05-29 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66339
           Summary: g++ 5.1.0 Generates memory leak
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: etcwilde at uvic dot ca
  Target Milestone: ---

There is a small memory leak (72kb) in the code outputted by g++.
I get this memory leak on programs with varying complexity, so it doesn't seem
to be a corner case with such a simple program.

The tested program:
int main() { return 0; }

Compiled with:
g++ main.cpp


Valgrind output:

==22976== HEAP SUMMARY:
==22976==     in use at exit: 72,704 bytes in 1 blocks
==22976==   total heap usage: 1 allocs, 0 frees, 72,704 bytes allocated
==22976== 
==22976== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1
==22976==    at 0x4C29F90: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22976==    by 0x4EC01EF: pool (eh_alloc.cc:117)
==22976==    by 0x4EC01EF: __static_initialization_and_destruction_0
(eh_alloc.cc:244)
==22976==    by 0x4EC01EF: _GLOBAL__sub_I_eh_alloc.cc (eh_alloc.cc:307)
==22976==    by 0x400F0E9: call_init.part.0 (in /usr/lib/ld-2.21.so)
==22976==    by 0x400F1FA: _dl_init (in /usr/lib/ld-2.21.so)
==22976==    by 0x4000DB9: ??? (in /usr/lib/ld-2.21.so)
==22976== 
==22976== LEAK SUMMARY:
==22976==    definitely lost: 0 bytes in 0 blocks
==22976==    indirectly lost: 0 bytes in 0 blocks
==22976==      possibly lost: 0 bytes in 0 blocks
==22976==    still reachable: 72,704 bytes in 1 blocks
==22976==         suppressed: 0 bytes in 0 blocks
==22976==


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-29 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29 22:35 [Bug c++/66339] New: g++ 5.1.0 Generates memory leak etcwilde at uvic dot ca

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