This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: [PATCH 3/5] remove deleted BFDs from the archive cache


>>>>> "HJ" == H J Lu <hjl.tools@gmail.com> writes:

HJ> I am not sure if we want to use bfd_zmalloc for all areltdata.  We
HJ> use bfd_ar_hdr_from_filesystem since we can't use member
HJ> objalloc nor archive objalloc.  In all other places, it is OK to
HJ> use archive objalloc for areltdata.

Aside from the latent bugs.

HJ> Do you have a testcase to show there is a problem?

barimba. valgrind --leak-check=full ./strip-new libutil.a 
[...]
==30145== 696 bytes in 6 blocks are definitely lost in loss record 21 of 21
==30145==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==30145==    by 0x432A58: bfd_zmalloc (libbfd.c:319)
==30145==    by 0x428807: bfd_ar_hdr_from_filesystem (archive.c:1899)
==30145==    by 0x428E4D: _bfd_write_archive_contents (archive.c:2131)
==30145==    by 0x4342FE: bfd_close (opncls.c:714)
==30145==    by 0x407991: copy_archive (objcopy.c:2208)
==30145==    by 0x407E54: copy_file (objcopy.c:2318)
==30145==    by 0x404699: main (objcopy.c:3168)

Tom


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