public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108178] New: Filesystem::copy_file can't copy from /proc on Linux machines
@ 2022-12-19 15:11 faivel555 at gmail dot com
  2022-12-19 15:39 ` [Bug libstdc++/108178] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: faivel555 at gmail dot com @ 2022-12-19 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108178
           Summary: Filesystem::copy_file can't copy from /proc on Linux
                    machines
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: faivel555 at gmail dot com
  Target Milestone: ---

Hello,
When trying to copy a file from /proc folder on Linux, copy_file won't copy the
file but will generate a success status.

The problem is that copy_file passes 0 file size to sendfile() on Linux
machines as you can see here:
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/src/filesystem/ops-common.h#L499 
, making sendfile() to do nothing. Since most of the files if not all files in
/proc don't have a valid file size, the copying will be successful but no files
are copied.


Thanks,
Faivel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-10-04 11:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 15:11 [Bug libstdc++/108178] New: Filesystem::copy_file can't copy from /proc on Linux machines 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
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

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).