[Bug libstdc++/102259] ifstream::read(…, count) fails when count >= 2^31 on darwin

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 6 19:44:25 GMT 2024


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

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #8)
> Patch posted:
> https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671057.html
> 
> It would be great if somebody could test this on macOS and/or FreeBSD to
> verify it works.

It seems to work for me - I tested with Michel's comment #1 (on a smaller file,
still with the 2G buffer and request).


before
$ ./twog
0 (0 bytes)

after
$ ./twog
0 (2305960 bytes)

(2305960 is, indeed the size of the file on  disk).


More information about the Gcc-bugs mailing list