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

Andrew atbrunner at aurawin.com
Wed Nov 7 00:38:36 CET 2012


On 12-11-06 05:23 PM, Michael Van Canneyt wrote:
>
> Works perfectly here. 64-bit linux, 8Gb mem.
> Are you trying this on a 32-bit system ? Because then it will of 
> course fail.
>
> Also, it contains a flaw, since the buffer is not initialized, and 
> will contain random data. So the tests at the end will fail and cause 
> an error. But this has nothing to do with range checking.
>
> Michael.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>

Fails EVERY time here.  And in production too.  I exclusively use memory 
streams.

Range Checking / Overflow off line 54 returns -2147483648 when I read 
only 2 bytes and MyBuffer should be [0,0] since that's what I wrote to 
the memory stream and shows it was never read into.







More information about the fpc-devel mailing list