Open tcoserea-msft opened 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.