[PATCH] D39444: [Support] Make the default chunk size of raw_fd_ostream to 1 GiB.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 19:59:12 PDT 2017
ruiu added inline comments.
================
Comment at: llvm/lib/Support/raw_ostream.cpp:580
pos += Size;
+ size_t MaxWriteSize = SIZE_MAX;
----------------
krytarowski wrote:
> ```
> If the value of nbyte is greater than {SSIZE_MAX}, the result is implementation-defined.
> ```
>
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html#tag_16_685
Ah. Then, maybe that's what Saleem observed? The existing code could make a write request that is larger than SSIZE_MAX (= 2 GiB - 1) on a 32-bit machine.
If so, we can just remove the ifdef for Linux and use SSIZE_T as the default MaxWriteSize.
https://reviews.llvm.org/D39444
More information about the llvm-commits
mailing list