[Bug libstdc++/102259] ifstream::read(…, count) fails when count >= 2^31 on darwin
mimomorin at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Dec 21 11:29:55 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102259
--- Comment #17 from Michel Morin <mimomorin at gmail dot com> ---
> I thought I saw some docs saying >= INT_MAX fails, but maybe I'm wrong.
> The Rust change uses INT_MAX - 1
The comment in the Rust code says
On OSX ... by rejecting any read with a size larger than or equal to INT_MAX
But at least on my tested mac systems (from 10.15 to 14) the read syscall
and istream::read works fine for count = INT_MAX.
If you'd like me to test it in the old mac (e.g. 10.7), please let me know (I
can test it after the weekend).
More information about the Gcc-bugs
mailing list