git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [test failure] Re: t4114 binary file becomes symlink
Date: Sat, 18 Jul 2009 11:31:49 -0400	[thread overview]
Message-ID: <20090718153148.GA9367@sigill.intra.peff.net> (raw)
In-Reply-To: <20090718141658.GE16708@vidovic>

On Sat, Jul 18, 2009 at 04:16:58PM +0200, Nicolas Sebrecht wrote:

> It fails on:
>   - next
>   - v1.6.3
>   - b67b9612e1a90ae093445abeaeff930e9f4cf936
>   - (other I don't remember, but does it really matter?)

Hmm. So it is clearly reproducible on your system, but not on mine. I
wonder what the difference could be.

Are you compiling with any special options? I usually compile with just
"-g -Wall -Werror", but I also tried with "-O2" and couldn't reproduce.
Maybe compiler version? I'm using gcc 4.3.3.

> ==10807== Invalid read of size 1
> ==10807==    at 0x4C22349: strlen (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
> ==10807==    by 0x5616ED6: vfprintf (in /lib64/libc-2.8.so)
> ==10807==    by 0x563C159: vsnprintf (in /lib64/libc-2.8.so)
> ==10807==    by 0x495E90: git_vsnprintf (snprintf.c:38)
> ==10807==    by 0x48917B: strbuf_addf (strbuf.c:203)
> ==10807==    by 0x412AA0: cmd_checkout (builtin-checkout.c:364)
> ==10807==    by 0x404222: handle_internal_command (git.c:243)
> ==10807==    by 0x404466: main (git.c:483)
> ==10807==  Address 0x1 is not stack'd, malloc'd or (recently) free'd

Looking at that strbuf_addf call, we presumably have a bogus pointer
either in old->name or new->name. Which is odd, since reading the code,
both get memset() to zero, and then assigned from something which should
be sane.

At this point, I would try either running it under gdb or putting in
some debugging printfs into update_refs_for_switch to try to isolate
where the bogus value is coming from (valgrind sees it as cmd_checkout,
but presumably that is because it inlines the static
update_refs_for_switch).

Can you try that? Otherwise, I'm not sure how to proceed because I can't
reproduce it on my box.

-Peff

  reply	other threads:[~2009-07-18 15:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 13:45 [test failure] t4114 binary file becomes symlink Nicolas Sebrecht
2009-07-18 13:56 ` Jeff King
2009-07-18 14:16   ` [test failure] " Nicolas Sebrecht
2009-07-18 15:31     ` Jeff King [this message]
2009-07-18 18:46       ` Junio C Hamano
2009-07-18 20:39         ` Nicolas Sebrecht
2009-07-18 23:18         ` Linus Torvalds
2009-07-18 19:06     ` Johannes Sixt
2009-07-18 20:17       ` Nicolas Sebrecht
2009-07-18 21:13         ` Nicolas Sebrecht
2009-07-19 10:33           ` ./configure misdetects SNPRINTF_RETURNS_BOGUS (was: [test failure] t4114 binary file becomes symlink) Jakub Narebski
2009-07-19 12:48             ` [PATCH] configure: use AC_SEARCH_LIBS instead of AC_CHECK_LIB Nicolas Sebrecht
2009-07-19 13:14               ` [PATCH] " Nicolas Sebrecht
2009-07-19 16:13                 ` Junio C Hamano
2009-07-19 22:53                   ` Eric Blake
2009-07-21 15:04               ` [PATCH] " Brandon Casey
2009-07-21 15:12                 ` Brandon Casey
2009-07-21 15:20                 ` Paolo Bonzini
2009-07-21 15:34                   ` Brandon Casey
2009-07-21 20:23                     ` [PATCH] configure.ac: rework/fix the NEEDS_RESOLV and NEEDS_LIBGEN tests Brandon Casey
2009-07-21 20:33                       ` Junio C Hamano
2009-07-22 14:59                         ` Brandon Casey
2009-07-22 22:15                       ` [PATCH] config.mak.in: continue fixing NEEDS_LIBGEN autoconfigure feature Brandon Casey
2009-07-22 22:35                         ` Junio C Hamano
2009-07-23 16:22                         ` Brandon Casey
2009-07-18 22:03         ` [test failure] Re: t4114 binary file becomes symlink Johannes Sixt
2009-07-18 22:29       ` Jeff King
2009-07-18 22:51         ` Nicolas Sebrecht
2009-07-19 11:01         ` Johannes Sixt
2009-07-20  9:09           ` Jeff King
2009-07-20 20:51             ` Johannes Sixt
2009-07-20 21:56               ` Linus Torvalds

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=20090718153148.GA9367@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nicolas.s.dev@gmx.fr \
    /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).