From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16104 invoked by alias); 6 Feb 2015 04:48:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15933 invoked by uid 48); 6 Feb 2015 04:47:59 -0000 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60956] error reading (and writing) large text files in gfortran Date: Fri, 06 Feb 2015 04:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00529.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60956 --- Comment #3 from Jerry DeLisle --- I took a closer look at this one. The error I am getting is running out of allocatable space in realloc used in fbuf.c (fbuf_alloc). We are allocating one byte at a time, and just keep trying to douple the buffer when its not big enough. I think we need to check for some max buffer size and when we approach it, flush the fbuf and continue.