bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/24955] libbfd terminating program on out of memory


From: cvs-commit at gcc dot gnu.org
Subject: [Bug binutils/24955] libbfd terminating program on out of memory
Date: Thu, 05 Sep 2019 04:23:16 +0000

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

--- 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 <address@hidden>:

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

commit 89bdc77eabf5ede68322f6e47e003c1dc45b9ccb
Author: Alan Modra <address@hidden>
Date:   Mon Sep 2 16:13:05 2019 +0930

    PR24955, libbfd terminating program on out of memory

    This patch fixes the worst of the cases where libbfd might terminate
    a program due to calling xstrdup or xmalloc.  I've also fixed some
    error paths that didn't clean up properly.

        PR 24955
        * libbfd-in.h (bfd_strdup): New inline function.
        * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup.  Close
        bfd on error.
        * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
        * opncls.c (bfd_fopen): Use bfd_strdup.  Close fd and stream
        on error.
        (bfd_openstreamr): Use bfd_strdup.
        (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
        * plugin.c (try_load_plugin): Use bfd_malloc.
        * libbfd.h: Regenerate.

-- 
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]