From: David Miller <davem@davemloft.net>
To: raa.lkml@gmail.com
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: testsuite failures in mainline...
Date: Fri, 14 Dec 2007 14:24:48 -0800 (PST) [thread overview]
Message-ID: <20071214.142448.52660507.davem@davemloft.net> (raw)
In-Reply-To: <20071214214533.GA4943@steel.home>
From: Alex Riesen <raa.lkml@gmail.com>
Date: Fri, 14 Dec 2007 22:45:33 +0100
> David Miller, Fri, Dec 14, 2007 20:17:36 +0100:
> > ++ git show-ref -q refs/remotes/local/master
> > ++ git branch my3 local/master
> > fatal: Out of memory, malloc failed
>
> Something unusual about the system? Like a malloc debugger in
> LD_PRELOAD configuration?
No, I'm not doing anything fancy like that.
> Maybe you could retry with a little bit instrumentation?
> (The program last failed (git-branch) is normally very benign...)
>
> Something like this:
Here is the output from the debugging patch:
++ git branch my3 local/master
fatal: Out of memory, malloc(4293963242) at git-compat-util.h:256 failed
This bogus size value in hex is 0xfff0adea, FWIW.
I added similar diags to xmemdupz() and xstrndup() and that gives us:
fatal: Out of memory, xstrndup(0x103ebf:4293902657:4293902657) at remote.c:112 failed
(the first three values are xstrndup() vars 'str', 'len', and
the computed second argument to xmemdupz).
That bogus length is being generated via the length argument
passed to make_branch() by handle_config() in remote.c:
if (!prefixcmp(key, "branch.")) {
name = key + 7;
subkey = strrchr(name, '.');
branch = make_branch(name, subkey - name);
What if 'subkey' is NULL? I bet that's what happening here.
I added a debugging check for this and indeed, subkey is NULL
in handle_condig() and that's why 'subkey - name' generates that
bogus negative length.
The string 'key' is "branch.autosetupmerge" in this case.
next prev parent reply other threads:[~2007-12-14 22:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 18:43 testsuite failures in mainline David Miller
2007-12-14 19:15 ` Junio C Hamano
2007-12-14 19:17 ` David Miller
2007-12-14 20:10 ` Junio C Hamano
2007-12-14 21:45 ` Alex Riesen
2007-12-14 22:24 ` David Miller [this message]
2007-12-14 23:18 ` Junio C Hamano
2007-12-15 0:08 ` David Miller
2007-12-15 1:18 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214.142448.52660507.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=raa.lkml@gmail.com \
/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.
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 NNTP newsgroup(s).