Subject: Re: [PATCH v3 0/6] midx-write: fix segfault and do several cleanups

From: Junio C Hamano <[email-masked]>
Date: Fri, 05 Sep 2025 12:38:08 -0700

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

> I was motivated to start looking closely at midx-write.c due to multiple
> users reporting Git crashes in their background maintenance, specifically
> during git multi-pack-index repack calls. I was eventually able to reproduce
> it in git multi-pack-index expire as well.
>
> Patch 1 is the only change we need to fix this bug. It includes a test case
> that will fail under --stress with SANITIZE=address. It requires creating
> many packfiles (50 was not enough, but 100 is enough). As far as I can tell,
> this bug has existed since Git 2.47.0 in October 2024, but I started hearing
> reports of this from users in July 2025 (and took a while to get a
> dump/repro).
>
> The remaining patches are cleanups based on my careful rereading of
> midx-write.c. There are some issues about error handling that needed some
> cleanup as well as a removal of the DISABLE_SIGN_COMPARE_WARNINGS macro.
>
>
> Updates in V3
> =============
>
>  * Use test_grep over grep.
>  * Translate an error message.
>  * Clarify a commit message.

All incremental changes made sense to me.  Will replace.

Shall we mark the topic ready for 'next' by now?

Thanks.