From: Stefan Beller <sbeller@google.com>
To: Jonas Thiel <jonas.lierschied@gmx.de>
Cc: Jeff King <peff@peff.net>, John Keeping <john@keeping.me.uk>,
Heiko Voigt <hvoigt@hvoigt.net>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Re: Re: Homebrew and Git
Date: Thu, 22 Sep 2016 08:57:45 -0700 [thread overview]
Message-ID: <CAGZ79kYUcyCrjPfqWtyWE-kaqbQZPG1qosc3qJrDfHixivyFew@mail.gmail.com> (raw)
In-Reply-To: <trinity-7a55c197-21af-4808-9919-6fc26bdcece2-1474536212197@3capp-gmx-bs75>
On Thu, Sep 22, 2016 at 2:23 AM, Jonas Thiel <jonas.lierschied@gmx.de> wrote:
> Sorry for my late reply. Thanks for your support -- I really appreciate that.
>
> @Jeff: Unfortunately, I do not know how to implement the patch you provided. Can you explain how to do that?
I think this should do:
git clone https://github.com/git/git
cd git
# get the email
wget http://public-inbox.org/git/20160921084841.phq7cfbagi5k7ku4@sigill.intra.peff.net/raw
# apply patch:
git am raw
make
make install
>
> Thanks and best regards,
> Jonas
>
>> Gesendet: Mittwoch, 21. September 2016 um 10:48 Uhr
>> Von: "Jeff King" <peff@peff.net>
>> An: "John Keeping" <john@keeping.me.uk>
>> Cc: "Heiko Voigt" <hvoigt@hvoigt.net>, "Jonas Thiel" <jonas.lierschied@gmx.de>, git@vger.kernel.org
>> Betreff: Re: Re: Homebrew and Git
>>
>> On Tue, Sep 20, 2016 at 08:15:55PM +0100, John Keeping wrote:
>>
>> > > BTW, here is the callstack inlined from the crashreport:
>> > >
>> > > bsystem_platform.dylib 0x00007fff840db41c _platform_strchr$VARIANT$Haswell + 28
>> > > 1 git 0x000000010ba1d3f4 ident_default_email + 801
>> > > 2 git 0x000000010ba1d68f fmt_ident + 66
>> > > 3 git 0x000000010ba4b495 files_log_ref_write + 175
>> > > 4 git 0x000000010ba4b0a6 commit_ref_update + 106
>> > > 5 git 0x000000010ba4c3a8 ref_transaction_commit + 468
>> > > 6 git 0x000000010b994dd8 s_update_ref + 271
>> > > 7 git 0x000000010b994556 fetch_refs + 1969
>> > > 8 git 0x000000010b9935f2 fetch_one + 1913
>> > > 9 git 0x000000010b992bc4 cmd_fetch + 549
>> > > 10 git 0x000000010b9666c4 handle_builtin + 478
>> > > 11 git 0x000000010b96602f main + 376
>> > > 12 libdyld.dylib 0x00007fff834ef5ad start + 1
>> > >
>> > > Maybe someone else has an idea what might be causing this...
>> >
>> > The only strchr I can see that could be called here is in
>> > canonical_name(), where it's called with addrinfo::ai_canonname.
>>
>> There's one in add_domainname(), too, but it can never be NULL (we could
>> walk off the end of the buffer, but only if gethostname() lies to us
>> about its result code, which seems unlikely). So I agree it's probably
>> the call in canonical_name().
>>
>> > Searching for OS X and ai_canonname, leads me straight back to this
>> > list, although 7 years ago! I think ident.c needs a fix similar to
>> > commit 3e8a00a (daemon.c: fix segfault on OS X, 2009-04-27); from the
>> > commit message there:
>> >
>> > On OS X (and maybe other unices), getaddrinfo(3) returns NULL
>> > in the ai_canonname field if it's called with an IP address for
>> > the hostname.
>>
>> Interesting. We are already prepared for failure from getaddrinfo()
>> here, so probably:
>>
>> diff --git a/ident.c b/ident.c
>> index e20a772..d17b5bd 100644
>> --- a/ident.c
>> +++ b/ident.c
>> @@ -101,7 +101,7 @@ static int canonical_name(const char *host, struct strbuf *out)
>> memset (&hints, '\0', sizeof (hints));
>> hints.ai_flags = AI_CANONNAME;
>> if (!getaddrinfo(host, NULL, &hints, &ai)) {
>> - if (ai && strchr(ai->ai_canonname, '.')) {
>> + if (ai && ai->ai_canonname && strchr(ai->ai_canonname, '.')) {
>> strbuf_addstr(out, ai->ai_canonname);
>> status = 0;
>> }
>>
>> would be sufficient. Jonas, can you see if that patch helps?
>>
>> -Peff
>>
next prev parent reply other threads:[~2016-09-22 15:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-18 15:50 Homebrew and Git Jonas Thiel
2016-09-20 11:02 ` Heiko Voigt
2016-09-20 11:07 ` Heiko Voigt
2016-09-20 19:15 ` John Keeping
2016-09-21 8:48 ` Jeff King
2016-09-22 9:23 ` Aw: " Jonas Thiel
2016-09-22 15:57 ` Stefan Beller [this message]
2016-09-23 4:07 ` Jeff King
2016-09-23 4:37 ` [PATCH] ident: handle NULL ai_canonname Jeff King
2016-09-20 18:45 ` Aw: Re: Homebrew and Git Jonas Thiel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGZ79kYUcyCrjPfqWtyWE-kaqbQZPG1qosc3qJrDfHixivyFew@mail.gmail.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=john@keeping.me.uk \
--cc=jonas.lierschied@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).