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

Re: Segmentation fault in git cherry-pick

From
Elijah Newren <newren@gmail.com>
Date
Jan 31, 2018, 22:06 UTC
Message-ID
<CABPp-BErnsyzUbu5dAFCs=Z5m3Z0k8vNkMJQ9=Tc=wWqPDYNFQ@mail.gmail.com>
In-Reply-To
<CAHZoaj41k0AU-S1cPH3p6gU6EzXfYiMasN7=Cv9SRd2xp=1ThA@mail.gmail.com>

On Wed, Jan 31, 2018 at 1:43 PM, Ayke van Laethem <aykevanlaethem@gmail.com> wrote:

Show 20 quoted lines
> Hi all,
>
> I've found a segmentation fault in git.
>
> Here, fabsf is a branch that I'm trying to get the topmost commit from.
> After the failed cherry-pick, the change is added to the local working
> tree, but the commit isn't applied and .git/index.lock still exists.
>
> Version: 2.11.0 (Debian stretch)
>
> ~/src/micropython/ports/nrf$ valgrind git cherry-pick fabsf
> ==23286== Memcheck, a memory error detector
> ==23286== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
> ==23286== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
> ==23286== Command: git cherry-pick fabsf
> ==23286==
> ==23286== Invalid read of size 4
> ==23286==    at 0x21A348: add_index_entry_with_check (read-cache.c:1012)
> ==23286==    by 0x21A348: add_index_entry (read-cache.c:1061)
> ==23286==    by 0x1FAE85: merge_content (merge-recursive.c:1727)

This looks like the stack trace in https://github.com/git-for-windows/git/issues/952, which was fixed by Johannes Schindelin in commit 55e9f0e5c ("merge-recursive: handle NULL in add_cacheinfo() correctly", 2016-11-26). Could you retry with a newer version of git?

Elijah
Previous: Ayke van LaethemNext: Ayke van Laethem
Message 2 of 3 in “Segmentation fault in git cherry-pick”
  1. Ayke van LaethemJan 31, 2018
  2. Elijah NewrenJan 31, 2018
  3. Ayke van LaethemFeb 3, 2018

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.