This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77 file truncation bug


mike@snl951.chem.metro-u.ac.jp wrote:

> The problem is that when a disk file is overwritten, and its new
> length is shorter than its previous length, the shorter length file
> is truncated in a peculiar way.  It seems the file is copied into
> the /tmp partition, reopened so it has zero length, and then the
> data is copied back into the file from /tmp.  This is not only very
> inefficient, it is sure to fail whenever the file is bigger than
> the free space in /tmp.  Since our disk files routinely exceed 1 GB,
> this is very often.  The fix for the problem is to use the system
> call ftruncate() instead of this double copying.

Again - thanks for your detailed bug report.  We have been able to
repair this shortcoming in the run time library of g77.

The upcoming release of the GNU Compiler Collection (version number
3.0), which is planned to be available in about a month's time, will
contain this fix.

Kind regards,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]