From: Kristoffer Haugsbakk Date: Tue, 30 Dec 2025 16:11:09 GMT Subject: Re: [PATCH] diff: avoid segfault with freed entries Message-ID: <66032fff-654f-4c46-a7d4-e80d594f2df3@app.fastmail.com> In-Reply-To: On Mon, Dec 29, 2025, at 22:44, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > >[snip] > The more elaborate explanation is that within diffcore_std(), we may > skip the initial prefetch due to the output format (--name-only in the > test) and go straight to diffcore_skip_stat_unmatch(). In that method, > the index entries that have been invalidated by path changes show up as > entries but may be deleted because they are not actually content diffs > and only newer timestamps than expected. As those entries are deleted, > later entries are checked with diff_filespec_check_stat_unmatch(), which > uses diff_queued_diff_prefetch() as the missing_object_cb in its diff > options. That can trigger downloading missing objects if the appropriate > scenario occurs to trigger a call to diff_popoulate_filespec(). It's s/diff_popoulate_filespec/diff_populate_filespec/ > finally within that callback to diff_queued_diff_prefetch() that the > segfault occurs. > >[snip]