This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, libfortran] PR47296 Segfault when running out of file descriptors
On Mon, Jan 17, 2011 at 04:37, Jerry DeLisle <jvdelisle@frontier.com> wrote:
> On 01/16/2011 12:11 PM, Janne Blomqvist wrote:
>>
>> Hello,
>>
>> the attached patch fixes the PR, the reason for the segfault was that
>> even if opening a temporary file fails we still access the file name
>> info. Thus don't free it in the unix.c:tempfile() function; freeing
>> opp->file is taken care of by the cleanup in open.c:new_unit() which
>> is the only caller. Thus this does not cause a memory leak (checked
>> with valgrind).
>>
>> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
>>
>
> yes, this is fine. ÂGo ahead and commit. ÂI am still doing some testing on
> cygwin, but my initial tests are OK. ÂThe only thing that has been holding
> me up is some build issues plus the time it takes to even try a build.
Sending libgfortran/ChangeLog
Sending libgfortran/io/unix.c
Transmitting file data ..
Committed revision 168888.
Thanks.
--
Janne Blomqvist