[Top][All Lists]

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

[Bug gold/15660] out of file descriptors and couldn't close any

From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/15660] out of file descriptors and couldn't close any
Date: Wed, 04 Feb 2015 04:06:53 +0000


--- Comment #16 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Cary Coutant <address@hidden>:


commit 2cfbf2fece582c29df348104b28677c38a8301f4
Author: Cary Coutant <address@hidden>
Date:   Tue Feb 3 19:54:57 2015 -0800

    Fix a file descriptor leak in gold.

    When an LTO linker plugin claims an external member of a thin archive, gold
    does not properly unlock the file and make its file descriptor available
    reuse. This patch fixes the problem by modifying Archive::include_member to
    unlock the object file via an RAII class instance, ensuring that it will be
    unlocked no matter what path is taken through the function.

        PR gold/15660
        * archive.cc (Thin_archive_object_unlocker): New class.
        (Archive::include_member): Unlock external members of thin archives.
        * testsuite/Makefile.am (plugin_test_1): Rename .syms files.
        (plugin_test_2): Likewise.
        (plugin_test_3): Likewise.
        (plugin_test_4): Likewise.
        (plugin_test_5): Likewise.
        (plugin_test_6): Likewise.
        (plugin_test_7): Likewise.
        (plugin_test_8): Likewise.
        (plugin_test_9): Likewise.
        (plugin_test_10): Likewise.
        (plugin_test_11): New test case.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/plugin_test.c (claim_file_hook): Check for parallel .syms
        file to decide whether to claim file.
        (all_symbols_read_hook): Likewise.
        * testsuite/plugin_test_1.sh: Adjust expected output.
        * testsuite/plugin_test_2.sh: Likewise.
        * testsuite/plugin_test_3.sh: Likewise.
        * testsuite/plugin_test_6.sh: Likewise.
        * testsuite/plugin_test_tls.sh: Likewise.
        * testsuite/plugin_test_11.sh: New testcase.

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]