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

Fix A/V thrown from while reading the git pack index #894

Merged
merged 1 commit into from
Feb 14, 2023

Commits on Feb 14, 2023

  1. Fix A/V thrown from while reading the git pack index

    We had been mapping only parts of the index into memory, and shifting the mapped window with each call to `GetSpan`. The problem was the caller would use `GetSpan` more than once, and hold each result such that it had a pointer/span into both windows when only one existed at any given point.
    
    This fixes a regression made in #892 (395dfa7).
    In that change, I tried to reduce the mapped file from the whole file to just a window. That was as part of fixing an `OutOfMemoryException`, but ultimately I believe that was due to a memory leak, which that PR also fixed. So in this change I keep the memory leak fix (by releasing the acquired pointer) but revert the smaller, moving window code change.
    AArnott committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    e11c786 View commit details
    Browse the repository at this point in the history