git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] seemingly-rare segfault in merge-tree

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 20, 2022, 21:24 UTC
Message-ID
<nqp61q74-1oqs-9n1s-q7s9-r8741n3r735p@tzk.qr>
In-Reply-To
<YyopmKNZU4WL2wrV@nand.local>
Hi Taylor,
On Tue, 20 Sep 2022, Taylor Blau wrote:
Show 10 quoted lines
> On Tue, Sep 20, 2022 at 04:57:36PM -0400, Taylor Blau wrote:
> >   #1  0x000056234188aba3 in real_merge (prefix=0x0, branch2=<optimized out>,
> >       branch1=<optimized out>, o=0x7ffd3fc4cd60) at builtin/merge-tree.c:528
> >   528	builtin/merge-tree.c: No such file or directory.
>
> I should mention, of course, that this line is custom to GitHub's fork,
> and so doesn't match with the latest on `master`. Here's a link to the
> relevant call that matches up:
>
>   https://github.com/git/git/blob/dda7228a83e2e9ff584bf6adbf55910565b41e14/builtin/merge-tree.c#L449

I am afraid that there is way more custom code from GitHub's internal fork involved in this report than meets the eye. The `result.tree` that is most likely the cause of the segmentation fault does not actually stem from `merge_incore_recursive()` as the linked source code might suggest.

Instead, it stems from the `merge_incore_nonrecursive()` call in the custom code that allows to specify a merge base manually (rather than let `git merge-tree` perform a full recursive merge). Custom code, I need to add, that is nowhere to be seen in upstream Git.

I did hint at this custom code during the Git Contributor Summit, and there seemed to be enough interest that I had appended an item to my ever-growing todo list to upstream this.

Ciao, Dscho

Previous: Taylor BlauNext: Taylor Blau
Message 3 of 4 in “[BUG] seemingly-rare segfault in merge-tree”
  1. Taylor BlauSep 20, 2022
  2. Taylor BlauSep 20, 2022
  3. Johannes SchindelinSep 20, 2022
  4. Taylor BlauSep 20, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.