This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Synthetic symbol leak in in elf_x86_64_get_synthetic_symtab and elf_read_minimal_symbols
- From: Pedro Alves <palves at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>, Yao Qi <qiyaoltc at gmail dot com>
- Cc: Alex Lindsay <alexlindsay239 at gmail dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, GDB <gdb-patches at sourceware dot org>
- Date: Thu, 17 Aug 2017 18:42:34 +0100
- Subject: Re: Synthetic symbol leak in in elf_x86_64_get_synthetic_symtab and elf_read_minimal_symbols
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F582C047B75
- References: <ce856f01-6e4b-5e74-fe8a-8e4aa0cb89e6@gmail.com> <20170811092709.GH8039@1170ee0b50d5> <CAMe9rOoG9JCky0uuoBe+_DUpVbGz3Ww2cBX1GSb1Nw5kByutaQ@mail.gmail.com> <20170811154542.GK8039@1170ee0b50d5> <CAMe9rOrGJ0z69+ZZxCuntx6DVpitoS8kdbOdDhPra=3eEACHNA@mail.gmail.com> <b70efed4-07e7-e9dc-d466-1d9323319b10@gmail.com> <86d17umpcg.fsf@gmail.com> <1502973107.1766.64.camel@skynet.be>
On 08/17/2017 01:31 PM, Philippe Waroquiers wrote:
> My knowledge of c++ is close to 0, so I cannot help much
> to find the source of the leak.
> I am wondering however who owns the memory allocated
> at dwarf2read.c:9362 :
> line_header_up lh = dwarf_decode_line_header (line_offset, cu);
> when the logic goes later on to line 9389
> gdb_assert (die->tag != DW_TAG_partial_unit);
> (for info: in the c version 7.11, this assert was followed by
> make_cleanup (free_cu_line_header, cu);
> )
That does look like the reason for the leak. I'm taking a look.
Thanks,
Pedro Alves