From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23099 invoked by alias); 17 Jan 2011 05:50:10 -0000 Received: (qmail 23085 invoked by uid 22791); 17 Jan 2011 05:50:09 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Jan 2011 05:50:02 +0000 Received: by iyj18 with SMTP id 18so4563206iyj.20 for ; Sun, 16 Jan 2011 21:50:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.145.68 with SMTP id c4mr3747917ibv.47.1295243400361; Sun, 16 Jan 2011 21:50:00 -0800 (PST) Received: by 10.231.160.68 with HTTP; Sun, 16 Jan 2011 21:50:00 -0800 (PST) In-Reply-To: <4D33AB6E.3050508@frontier.com> References: <4D33AB6E.3050508@frontier.com> Date: Mon, 17 Jan 2011 07:51:00 -0000 Message-ID: Subject: Re: [Patch, libfortran] PR47296 Segfault when running out of file descriptors From: Janne Blomqvist To: Jerry DeLisle Cc: Fortran List , GCC Patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg01118.txt.bz2 On Mon, Jan 17, 2011 at 04:37, Jerry DeLisle 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. =C2=A0Go ahead and commit. =C2=A0I am still doing some= testing on > cygwin, but my initial tests are OK. =C2=A0The only thing that has been h= olding > 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. --=20 Janne Blomqvist