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

            Bug ID: 83279
           Summary: std::experimental::filesystem::copy_file can't copy
                    larger files than 2.0GiB
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ta12ba34 at gmail dot com
  Target Milestone: ---

GCC-version: 7.2.0
System: KDE neon (based on Ubuntu 16.04 LTS) x64, x86_64-linux-gnu
GCC-configuration-options: --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu --enable-checking=release --enable-languages=c,c++
--program-suffix=-7.2 --disable-multilib --prefix=/opt/gcc-7.2.0

compile line: g++ -std=c++17 *.cpp *.h -lstdc++fs

thrown exception: filesystem error: cannot copy file: No such file or directory
[/path/to/sourcefile] [/path/to/destinationfile]

preprocessed file: see attachment

detailed description:
The function std::experimental::filesystem::copy_file is not able to copy any
file larger than 2.0GiB (2147483647 Bytes). If you try this, the mentioned
exception will be thrown after 2.0GiB of an >2.0GiB-file were copied - so that
the copy process is canceled and the copied file is incomplete.
I could reproduce this behavior in more than one program by simply using
std::experimental::filesystem::copy.
However, when I compiled it with GCC 5.4.0 (g++ -std=c++14 *.cpp *.h
-lstdc++fs) everything works fine and I can copy files with a size of over
2.0GiB.


I am sorry for any English mistakes.
Please contact me if there are any open questions.

Reply via email to