threads / bug / 45138

[BUG] Memory corruption crash with "git bisect start"

Subject: [BUG] Memory corruption crash with "git bisect start"

## tl;dr

2 messages between Feb 14, 2017 and Feb 14, 2017.

replies: 1people: 2as markdown or json

Maxim Kuvyrkov· Feb 14, 2017, 11:56 UTC · lore
I'm seeing the following memory corruption crash on a script-constructed repo when starting git bisect.  I'm seeing this crash both with system git of Ubuntu Xenial and with freshly-compiled git master from the official repo.
The log of the crash is attached.
It is possible that the bug is in Xenial glibc, in which case -- please let me know and I will take it up with the glibc developers.
To reproduce the crash:

<snip> # Create a repo with 42 files, and change all of them. rm -rf .git git init for i in `seq 1 42`; do echo 0 > f$i; git add f$i; echo 1 > f$i; done git commit -m 0

# Download script to generate bisect history: pushd ../ wget https://git.linaro.org/people/maxim.kuvyrkov/tree-bisect.git/plain/construct-tree.sh popd

# Construct tree for bisect. This script creates a history graph for all permutations of changed files up to "2" in depth. # The goal of the script is to assist in reducing testcases for compiler/toolchain development. ../construct-tree.sh -d 2

# Trigger crash git bisect start bottom top </snip>

It is interesting that "42" number files is boundary.  The crash does not occur with history generated from 41 or fewer files, and only occurs with 42 or more files.  It appears that the contents of the files is not relevant for the crash.

-- Maxim Kuvyrkov www.linaro.org

Christian Couder· Feb 14, 2017, 14:52 UTC · re: Maxim Kuvyrkov · lore

Re: [BUG] Memory corruption crash with "git bisect start"

On Tue, Feb 14, 2017 at 12:56 PM, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> wrote:

> I'm seeing the following memory corruption crash on a script-constructed repo when starting git bisect.  I'm seeing this crash both with system git of Ubuntu Xenial and with freshly-compiled git master from the official repo.
>
> The log of the crash is attached.
Yeah, thanks for the report.

I took a look and it looks like git bisect crashes when it runs git show-branch and it can be reproduced with just `git show-branch bottom` instead of `git bisect start bottom top`.

> It is possible that the bug is in Xenial glibc, in which case -- please let me know and I will take it up with the glibc developers.
I have Ubuntu GLIBC 2.23-0ubuntu5 and I get a crash too.

← back to recent threads