This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/24700] Bad write after backing up from end of file
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Nov 2005 23:58:37 -0000
- Subject: [Bug libfortran/24700] Bad write after backing up from end of file
- References: <bug-24700-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2005-11-06 23:58 -------
Testing that patch gives the following results. I will put together a test
case and commit this as obvious unless there are objections.
hex dump of TEST file created using gfortran 4.0.1 gives, with no patch:
$ xxd TEST
0000000: 0800 0000 0000 0000 2a2a 5445 5354 2a2a ........**TEST**
0000010: 0800 0000 0000 0000 0800 0000 0000 0000 ................
0000020: 2a2a 5445 5354 2a2a 0800 0000 0000 0000 **TEST**........
With gfortran 4.1 we get:
$ xxd TEST
0000000: 0800 0000 0000 0000 2a2a 5445 5354 2a2a ........**TEST**
0000010: 0800 0000 0000 0000 2a2a 5445 5354 2a2a ........**TEST**
0000020: ffff ffff ffff ff7f ........
With Georgy's patch on 4.0.3:
$ xxd TEST
0000000: 0800 0000 0000 0000 2a2a 5445 5354 2a2a ........**TEST**
0000010: 0800 0000 0000 0000 0800 0000 0000 0000 ................
0000020: 2a2a 5445 5354 2a2a 0800 0000 0000 0000 **TEST**........
With Georgy's patch on 4.1:
$ xxd TEST
0000000: 0800 0000 0000 0000 2a2a 5445 5354 2a2a ........**TEST**
0000010: 0800 0000 0000 0000 0800 0000 0000 0000 ................
0000020: 2a2a 5445 5354 2a2a 0800 0000 0000 0000 **TEST**........
So it appears we had a regression from 4.0.1 in there somehow and did not catch
it.
Regards
Jerry
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-06 23:58:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24700