Show 25 quoted lines
> On Thu, Jan 18, 2018 at 9:47 PM, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> > On Thu, Jan 18, 2018 at 07:15:56PM -0500, Eric Sunshine wrote:
> >> On Thu, Jan 18, 2018 at 3:55 PM, Александр Булаев
> >> <aleks.bulaev@gmail.com> wrote:
> >> > I found that git 2.16.0 segfaults on clone of vim-colorschemes repo.
> >>
> >> I can confirm that this crashes on MacOS; it does not crash on Linux or
> BSD.
> >>
> >> git-bisect places blame on eb0ccfd7f5 (Switch empty tree and blob
> >> lookups to use hash abstraction, 2017-11-12).
> >
> > I unfortunately don't have a macOS system to test with, and I've
> > compiled with both gcc and clang on my Debian system and, as you
> > mentioned, it doesn't fail there.
> >
> > I have a guess about what the problem might be. Can you try this
> > patch and see if it fixes things?
>
> That does fix the crash. Thanks for the quick diagnosis.
>
> Can the commit message go into more detail as to why this was crashing (or
> your speculation about why)? Perhaps give more detail about what 'clone' is
> doing that led to the crash.
Show 36 quoted lines
>
> > -- >8 --
> > From 10b690241619a452634b31fbc5ccd054a4f6e5ec Mon Sep 17 00:00:00
> 2001
> > From: "brian m. carlson" <sandals@crustytoothpaste.net>
> > Date: Sun, 14 Jan 2018 18:26:29 +0000
> > Subject: [PATCH] repository: pre-initialize hash algo pointer
> >
> > There are various git subcommands (among them, clone) which don't set
> > up the repository but end up needing to have information about the
> > hash algorithm in use. In the future, we can add a command line
> > option for this or read it from the configuration, but until we're
> > ready to expose that functionality to the user, simply initialize the
> > repository structure to use the current hash algorithm, SHA-1.
> >
> > Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> > ---
> > repository.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/repository.c b/repository.c index 998413b8bb..f66fcb1342
> > 100644
> > --- a/repository.c
> > +++ b/repository.c
> > @@ -5,7 +5,7 @@
> >
> > /* The main repository */
> > static struct repository the_repo = {
> > - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index,
> NULL, 0, 0
> > + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> > + &the_index, &hash_algos[GIT_HASH_SHA1], 0, 0
> > };
> > struct repository *the_repository = &the_repo;
> >
> > --