-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: demonstrate overflow with sendfile (#10334) See #10333 Signed-off-by: Etienne Millon <[email protected]> * fix: use `Long_val` for sendfile() parameters to fix file copying in docker (#10333) * fix: sendfile() in docker Signed-off-by: Haoxiang Fei <[email protected]> * use ssize_t for return value Co-authored-by: Etienne Millon <[email protected]> Signed-off-by: Haoxiang Fei <[email protected]> * update test Signed-off-by: Etienne Millon <[email protected]> * Add changelog Signed-off-by: Etienne Millon <[email protected]> --------- Signed-off-by: Haoxiang Fei <[email protected]> Signed-off-by: Haoxiang Fei <[email protected]> Signed-off-by: Etienne Millon <[email protected]> Co-authored-by: Etienne Millon <[email protected]> Co-authored-by: Etienne Millon <[email protected]> * fix formatting (#10356) Signed-off-by: Etienne Millon <[email protected]> * move changelog entry to the right place (#10375) Signed-off-by: Etienne Millon <[email protected]> --------- Signed-off-by: Etienne Millon <[email protected]> Signed-off-by: Haoxiang Fei <[email protected]> Signed-off-by: Haoxiang Fei <[email protected]> Co-authored-by: Haoxiang Fei <[email protected]>
- Loading branch information
1 parent
95f208c
commit f434ff8
Showing
4 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- fix overflow in sendfile stubs (copy of large files could fail or end with | ||
truncated files) (#10333, @tonyfettes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
We create a large file and check that it is copied completely. | ||
|
||
$ cat > dune-project << EOF | ||
> (lang dune 1.0) | ||
> EOF | ||
|
||
$ cat > create.ml << EOF | ||
> let () = Unix.truncate "file.dat" 0x1_00_00_00_03 | ||
> EOF | ||
$ touch file.dat | ||
$ ocaml unix.cma create.ml | ||
$ rm create.ml | ||
|
||
$ dune build file.dat | ||
|
||
$ dune_cmd stat size file.dat | ||
4294967299 | ||
|
||
$ dune_cmd stat size _build/default/file.dat | ||
4294967299 | ||
|
||
(3 indicates that the file size is taken modulo 2**32) |