FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

pack: dereference cached pack entry on error by pks-t · Pull Request #4027 · libgit2/libgit2 · GitHub

Repository navigation

pack: dereference cached pack entry on error - #4027

Merged
carlosmn merged 1 commit into
libgit2:masterfrom
pks-t:pks/pack-deref-cache-on-error
Dec 19, 2016
Merged

carlosmn merged 1 commit into
libgit2:masterfrom
pks-t:pks/pack-deref-cache-on-error

Conversation

pks-t commented Dec 12, 2016

Copy link
Copy Markdown
Member

When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.

When trying to uncompress deltas in a packfile's delta chain, we try to
add object bases to the packfile cache, subsequently decrementing its
reference count if it has been added successfully. This may lead to a
mismatched reference count in the case where we exit the loop early due
to an encountered error.

Fix the issue by decrementing the reference count in error cleanup.

pks-t commented Dec 12, 2016

Copy link
Copy Markdown
Member Author

Just noticed this possible memory leak/reference count error as I took a quick look at #4023. It might cause the issue in case where we fail to unpack packfiles over NFS, as we would have a mismatched reference count then, triggering the assert. But I think it is rather unlikely.

carlosmn merged commit 903955f into libgit2:master Dec 19, 2016
pks-t deleted the pks/pack-deref-cache-on-error branch February 8, 2017 15:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL