cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Large file support on 32bit platforms

Open tcoserea-msft opened this issue 4 years ago • 2 comments

  • on 32bit platforms size_t is not enough to support files with size greater than 4GB.

tcoserea-msft avatar Jul 21 '21 22:07 tcoserea-msft

CLA assistant check
All CLA requirements met.

I don't have a lot of time to review this for correctness on all our platforms and so would like tests, in particular for every data value widened from size_t to int64_t I'd like to see a test that results in that data value actually exceeding UINT32_MAX. I already spotted several instances where you're using int64_t as an offset into an array, or passing it to memcpy.

I'd suggest using truncate(on linux) or SetEndOfFile (on windows) to create a very large file, and then write some known data to a few pages in the very large region.

barcharcraz avatar Aug 09 '21 15:08 barcharcraz