All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Ruderich <simon@ruderich.org>
To: git@vger.kernel.org
Subject: Crash when using git blame on untracked file
Date: Sat, 27 Aug 2016 19:53:36 +0200	[thread overview]
Message-ID: <20160827175336.bphgkb6zclvwfntk@ruderich.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

Hello,

I'm seeing the following crash with Git 2.9.3 on Debian sid
(amd64):

    $ git init foo
    $ cd foo
    $ touch x
    $ git add x
    $ git commit -m test
    $ touch x.conf
    $ git blame x.conf
    segmentation fault

I've tested it on Debian stable's 2.1.4 which works fine:

    $ git blame x.conf
    fatal: no such path 'x.conf' in HEAD

It requires the blamed file to be present, but in some cases it
works only if the file e.g. "x" is already tracked in Git and the
other file is called "x.conf" (".conf"-suffix). But in an empty
repo it seems to happen always.

Sadly Debian's git has no dbg-package, so the stacktrace is not
very useful:

    #0  __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
    #1  0x000000000041ad7a in ?? ()
    #2  0x0000000000406171 in ?? ()
    #3  0x0000000000405321 in ?? ()
    #4  0x00007ffff6f9f700 in __libc_start_main (main=0x4051c0, argc=0x3, argv=0x7fffffffe1a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe198)
        at ../csu/libc-start.c:291
    #5  0x00000000004057d9 in ?? ()

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

             reply	other threads:[~2016-08-27 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27 17:53 Simon Ruderich [this message]
2016-08-27 20:01 ` Crash when using git blame on untracked file Thomas Gummerer
2016-08-29 18:27   ` Junio C Hamano
2016-08-29 19:50     ` [PATCH v2] blame: fix segfault on untracked files Thomas Gummerer
2016-08-29 21:17       ` Junio C Hamano

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=20160827175336.bphgkb6zclvwfntk@ruderich.org \
    --to=simon@ruderich.org \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.