about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorThe8472 <git@infinite-source.de>2020-08-14 22:39:04 +0200
committerThe8472 <git@infinite-source.de>2020-08-14 22:41:13 +0200
commit4ddedd521418d67e845ecb43dc02c09b0af53022 (patch)
treed7f8149d8fa529b0c85e65c9265916e0768ccf4e /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentf0783632d315db90c0ca34d79d56207d132f3764 (diff)
downloadrust-4ddedd521418d67e845ecb43dc02c09b0af53022.tar.gz
rust-4ddedd521418d67e845ecb43dc02c09b0af53022.zip
perform copy_file_range until EOF is reached instead of basing things on file size
This solves several problems

- race conditions where a file is truncated while copying from it. if we blindly trusted
  the file size this would lead to an infinite loop
- proc files appearing empty to copy_file_range but not to read/write
  https://github.com/coreutils/coreutils/commit/4b04a0c
- copy_file_range returning 0 for some filesystems (overlay? bind mounts?)
  inside docker, again leading to an infinite loop
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions