This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/21947] New: Memory leak coming from obstack


https://sourceware.org/bugzilla/show_bug.cgi?id=21947

            Bug ID: 21947
           Summary: Memory leak coming from obstack
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: alexlindsay239 at gmail dot com
  Target Milestone: ---

If I run `gdb ./hello_world` through valgrind, I get (among some other leaks):

==32024== 20,320 bytes in 5 blocks are definitely lost in loss record 11,413 of
11,460
==32024==    at 0x4C2DE31: malloc (vg_replace_malloc.c:299)
==32024==    by 0x3C3725: xmalloc (common-utils.c:44)
==32024==    by 0x734C20: call_chunkfun (obstack.c:94)
==32024==    by 0x734CE3: _obstack_begin_worker (obstack.c:141)
==32024==    by 0x734DED: _obstack_begin (obstack.c:164)
==32024==    by 0x21A289: auto_obstack::auto_obstack() (gdb_obstack.h:70)
==32024==    by 0x4FC649: objfile_per_bfd_storage::objfile_per_bfd_storage()
(objfiles.h:188)
==32024==    by 0x4F87EC: get_objfile_bfd_data(objfile*, bfd*) (objfiles.c:157)
==32024==    by 0x4F95D6: allocate_objfile(bfd*, char const*,
enum_flags<objfile_flag>) (objfiles.c:420)
==32024==    by 0x561F24: symbol_file_add_with_addrs(bfd*, char const*,
enum_flags<symfile_add_flag>, section_addr_info*, enum_flags<objfile_flag>,
objfile*) (symfile.c:1158)
==32024==    by 0x56228B: symbol_file_add_from_bfd(bfd*, char const*,
enum_flags<symfile_add_flag>, section_addr_info*, enum_flags<objfile_flag>,
objfile*) (symfile.c:1268)
==32024==    by 0x5458FB: solib_read_symbols(so_list*,
enum_flags<symfile_add_flag>) (solib.c:707)

Perhaps this is purely a libiberty bug?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]