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 libstdc++/108178] Filesystem::copy_file can't copy from /proc on Linux machines
Date: Tue, 06 Jun 2023 11:38:00 +0000	[thread overview]
Message-ID: <bug-108178-4-sadeXbrjtq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108178-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:07a0e108247f23fcb919c61595adae143f1ea02a

commit r14-1570-g07a0e108247f23fcb919c61595adae143f1ea02a
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Mar 21 12:29:08 2023 +0000

    libstdc++: Make std::filesystem::copy_file work for procfs [PR108178]

    The size reported by stat is always zero for some special files such as
    those under /proc, which means the current copy_file implementation
    thinks there is nothing to copy. Instead of trusting the stat value, try
    to read a character from a streambuf and check for EOF.

    libstdc++-v3/ChangeLog:

            PR libstdc++/108178
            * src/filesystem/ops-common.h (do_copy_file): Check for empty
            files by trying to read a character.
            * testsuite/27_io/filesystem/operations/copy_file_108178.cc:
            New test.

  parent reply	other threads:[~2023-06-06 11:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 15:11 [Bug libstdc++/108178] New: " faivel555 at gmail dot com
2022-12-19 15:39 ` [Bug libstdc++/108178] " rguenth at gcc dot gnu.org
2022-12-19 15:47 ` redi at gcc dot gnu.org
2022-12-19 15:53 ` redi at gcc dot gnu.org
2022-12-20 12:39 ` rguenth at gcc dot gnu.org
2023-03-21 12:02 ` redi at gcc dot gnu.org
2023-03-22 12:21 ` redi at gcc dot gnu.org
2023-06-06 11:38 ` cvs-commit at gcc dot gnu.org [this message]
2023-06-06 14:10 ` cvs-commit at gcc dot gnu.org
2023-06-06 14:20 ` redi at gcc dot gnu.org
2023-10-03 16:11 ` cvs-commit at gcc dot gnu.org
2023-10-04 11:29 ` cvs-commit at gcc dot gnu.org
2023-10-04 11:34 ` redi 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-108178-4-sadeXbrjtq@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).