microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
8.01k stars 1.66k forks source link

Large file support on 32bit platforms #1636

Open tcoserea-msft opened 3 years ago

tcoserea-msft commented 3 years ago
ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

barcharcraz commented 3 years ago

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.