bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/29233] Memory leak in copy_relocations_in_section


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/29233] Memory leak in copy_relocations_in_section
Date: Mon, 04 Jul 2022 13:25:06 +0000

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

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0772daccb3ebaf513badf4266e1948454b4455c1

commit 0772daccb3ebaf513badf4266e1948454b4455c1
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Jul 4 11:24:22 2022 +0930

    objcopy: bfd_alloc orelocation

    This fixes an inconsequential objcopy memory leak.  I'd normally
    ignore reports of leaks like this one, that are merely one block or
    fewer per section processed, since objcopy soon exits and frees all
    memory.  However I thought it worth providing support for allocating
    memory on a bfd objalloc in objcopy and other utils.

            PR 29233
            * bucomm.c (bfd_xalloc): New function.
            * bucomm.h (bfd_xalloc): Declare.
            * objcopy.c (copy_relocations_in_section): Use it to allocate
            array of reloc pointers.  Rewrite code stripping relocs to do
            without extra memory allocation.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]