This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file
- From: Cary Coutant <ccoutant at google dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 Jan 2015 11:44:44 -0800
- Subject: Re: PR lto/64837: lto plugin doesn't call ld_plugin_release_input_file
- Authentication-results: sourceware.org; auth=none
- References: <20150128181242 dot GA4350 at intel dot com> <DC893389-7AE0-45DA-A65B-124426D91CF3 at gmail dot com> <CAMe9rOqxNUzhanCShsgfLsqj_QJibroQZrF+g4y8c=XQxZnd8A at mail dot gmail dot com>
>>>This patch makes claim_file_handler to call release_input_file after it
>>>finishes processing input file. OK for trunk?
>>
>> OK. How did you test this?
>
> I did normal bootstrap and "make check" on Linux/x86-64.
> I also run ld.bfd and ld.gold by hand to verify that release_input_file
> is called.
But release_input_file is only supposed to be used after calling
get_input_file from the all_symbols_read handler. It's not needed in
the claim_file handler. If gold isn't freeing the file descriptor
properly in that case, it's a bug entirely within gold (I think). I'm
looking at it.
-cary