Skip to content

Fix a memory corruption problem in git multi-pack-index expire - #142

Closed
Johannes Schindelin (dscho) wants to merge 1 commit into
vfs-2.21.0from
fix-midx-expire-segfault
Closed

Fix a memory corruption problem in git multi-pack-index expire#142
Johannes Schindelin (dscho) wants to merge 1 commit into
vfs-2.21.0from
fix-midx-expire-segfault

Conversation

@dscho

Copy link
Copy Markdown
Member

I, or more correctly: our Pipeline, noticed this in #140. Running t5319 through valgrind did help diagnose this pretty quickly.

When we close a pack, it might still be in the Most-Recently-Used list.
If we truly want to remove it (and release its memory), we have to
remove it from that list first.

This fixes a complaint by valgrind, and a segmentation fault on Windows
(where nedmalloc stumbles right over the overwritten memory).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho

Copy link
Copy Markdown
Member Author

Oops. This is not an issue in vfs-2.21.0, lucky us: the problem in #140 is caused by an unhappy interaction between ds/midx-too-many-packs and ds/midx-expire-repack.

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.

1 participant