[fpc-devel] Memory Streams unable to handle reads past 2GB

Andrew atbrunner at aurawin.com
Tue Nov 6 23:52:17 CET 2012


On 12-11-06 02:50 AM, michael.vancanneyt at wisa.be wrote:
> Since you can only read 2GB (Count is a longint) in a single read
> operation, it makes no sense to return a 64-bit result.
>
> Note that the operating system only allows 2Gb reads anyway, even on
> 64-bit
> systems.
>

Hi Michael,

Thanks but that's not the problem.  I can't even write 2bytes to a 2GB 
memory/file stream.

See: http://bugs.freepascal.org/view.php?id=23284 for attached test case 
shows simple math exactly like read/write in streams

This is another glitch that I must overcome.  My sync app can't handle 
zip files >=~2GB

The problem is with overflow.  FPC raises an exception (as it should).
I realize this is going to affect a couple base classes too.





More information about the fpc-devel mailing list