https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60956
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Jerry DeLisle from comment #3) > 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. I think we cannot completely get rid of buffering a complete record - if we do formatted I/O (contrary to list-directed I/O and unformatted). The problem is that the format can contain T, TL and TR. However, the test case only contains list-directed I/O, which doesn't require to cache the whole record. [For formatted, one could check the format statement - but there could be some performance trade off.]