public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/105456] Child I/O does not propage iostat
Date: Thu, 07 Mar 2024 03:58:08 +0000	[thread overview]
Message-ID: <bug-105456-4-AwQayYwb3R@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105456-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jerry DeLisle <jvdelisle@gcc.gnu.org>:

https://gcc.gnu.org/g:03932d3203bce244edd812b81921c2f16ea18d86

commit r14-9348-g03932d3203bce244edd812b81921c2f16ea18d86
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date:   Wed Mar 6 19:46:04 2024 -0800

    Fortran: Fix issue with using snprintf function.

    The previous patch used snprintf to set the message
    string. The message string is not a formatted string
    and the snprintf will interpret '%' related characters
    as format specifiers when there are no associated
    output variables. A segfault ensues.

    This change replaces snprintf with a fortran string copy
    function and null terminates the message string.

            PR libfortran/105456

    libgfortran/ChangeLog:

            * io/list_read.c (list_formatted_read_scalar): Use fstrcpy
            from libgfortran/runtime/string.c to replace snprintf.
            (nml_read_obj): Likewise.
            * io/transfer.c (unformatted_read): Likewise.
            (unformatted_write): Likewise.
            (formatted_transfer_scalar_read): Likewise.
            (formatted_transfer_scalar_write): Likewise.
            * io/write.c (list_formatted_write_scalar): Likewise.
            (nml_write_obj): Likewise.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr105456.f90: Revise using '%' characters
            in users error message.

  parent reply	other threads:[~2024-03-07  3:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 16:49 [Bug libfortran/105456] New: " tkoenig at gcc dot gnu.org
2022-05-02 16:50 ` [Bug libfortran/105456] " tkoenig at gcc dot gnu.org
2023-04-26  6:56 ` rguenth at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2023-08-15  3:10 ` jvdelisle at gcc dot gnu.org
2024-02-22 19:13 ` jvdelisle at gcc dot gnu.org
2024-02-25 22:55 ` cvs-commit at gcc dot gnu.org
2024-03-06  4:54 ` cvs-commit at gcc dot gnu.org
2024-03-07  3:58 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-12  1:08 ` 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-105456-4-AwQayYwb3R@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).