Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure 32-bit Git LFS binaries can handle files larger than 4 GiB #3426

Merged
merged 1 commit into from Dec 19, 2018

Conversation

bk2204
Copy link
Member

@bk2204 bk2204 commented Dec 12, 2018

When parsing pointers, we parsed the size of the object using ParseInt with a third argument of 0. This caused the argument to be parsed as an int, which on 32-bit systems is 32 bits in size. Consequently, when we had an object larger than 4 GiB in size on a 32-bit system, we would reject the pointer file as invalid and never realize the object needed to be pushed, leading to the server side rejecting our pushes due to missing objects.

Set the size of the integer we're parsing to 64 bits to ensure that we can always parse a pointer correctly. With this change, we can handle files larger than 4 GiB on 32-bit binaries.

I have opted not to add a test to this case because the processing time to hash a 4 GiB file is significant and the test would be fairly slow, but if people feel strongly that we should add one anyway, I can do that. Note that this would likely not affect CI, because I believe all of those systems are 64 bit.

@bk2204 bk2204 requested a review from a team December 12, 2018 22:19
When parsing pointers, we parsed the size of the object using ParseInt
with a third argument of 0. This caused the argument to be parsed as an
int, which on 32-bit systems is 32 bits in size. Consequently, when we
had an object larger than 4 GiB in size on a 32-bit system, we would
reject the pointer file as invalid and never realize the object needed
to be pushed, leading to the server side rejecting our pushes due to
missing objects.

Set the size of the integer we're parsing to 64 bits to ensure that we
can always parse a pointer correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants