public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/61632] Memory corruption on error when writing formatted data
Date: Tue, 15 Jul 2014 15:13:00 -0000	[thread overview]
Message-ID: <bug-61632-4-2imYYhoMLM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61632-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61632

--- Comment #18 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> I did not say that iostat had to be used.  However, one can find 
> things like:
>
> 9.10.1     Error conditions and the ERR= specifier
>
> If an error condition occurs during execution of an input/output
> statement, the position of the file becomes indeterminate.
>
> 9.2.3.3   File position after data transfer
>
> If an error condition (9.10) occurred, the position of the file
> is indeterminate.
>
> If one explicitly uses IOSTAT= in an IO statement, it may be
> prudent to actually check its value.

AFAICT this does not change the problem (see the tests in comments 2, 3, and
15). Now if "the position of the file becomes indeterminate", I believe it
should be restored to a defined state after the error as been processed, either
after the jump to the error label for ERR= or after setting the value of
IOSTAT, see my comment

> Along this line, I have found that 'parse_format' is called only once even
> if 'ss' is called twice.

in comment 15.


  parent reply	other threads:[~2014-07-15 15:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 14:33 [Bug fortran/61632] New: memory corruption in Fortran RTL " arnaud02 at users dot sourceforge.net
2014-06-27 22:36 ` [Bug fortran/61632] " dominiq at lps dot ens.fr
2014-06-28 21:20 ` dominiq at lps dot ens.fr
2014-07-12 22:12 ` jvdelisle at gcc dot gnu.org
2014-07-13  7:49 ` dominiq at lps dot ens.fr
2014-07-13 17:05 ` jvdelisle at gcc dot gnu.org
2014-07-13 21:40 ` jvdelisle at gcc dot gnu.org
2014-07-13 22:46 ` dominiq at lps dot ens.fr
2014-07-14  0:47 ` jvdelisle at gcc dot gnu.org
2014-07-14 14:27 ` [Bug fortran/61632] Memory corruption on error " dominiq at lps dot ens.fr
2014-07-14 18:30 ` dominiq at lps dot ens.fr
2014-07-15  2:22 ` jvdelisle at gcc dot gnu.org
2014-07-15  9:08 ` dominiq at lps dot ens.fr
2014-07-15 14:51 ` dominiq at lps dot ens.fr
2014-07-15 14:58 ` sgk at troutmask dot apl.washington.edu
2014-07-15 15:13 ` dominiq at lps dot ens.fr [this message]
2014-07-16  3:20 ` jvdelisle at gcc dot gnu.org
2014-07-19  3:24 ` jvdelisle at gcc dot gnu.org
2014-07-20 18:18 ` dominiq at lps dot ens.fr
2014-07-20 20:04 ` jvdelisle at gcc dot gnu.org
2014-07-25 21:51 ` jvdelisle at gcc dot gnu.org
2015-01-15  4:26 ` jvdelisle at gcc dot gnu.org
2015-02-12  0:25 ` jvdelisle at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61632-4-2imYYhoMLM@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).