All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian Dröge" <sebastian@centricular.com>
To: git@vger.kernel.org
Subject: [BUG] git cherry-pick segfaults with local changes in working directory
Date: Thu, 15 Jun 2017 12:11:50 +0300	[thread overview]
Message-ID: <1497517910.2239.105.camel@centricular.com> (raw)

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

Hi,

This is with git 2.11.0 (Debian 2.11.0-4) and can be reproduced with
the packed checkout here:
  https://people.freedesktop.org/~slomo/git-cherry-pick-segfault_gst-plugins-good.tar.xz

$ tar xf git-cherry-pick-segfault_gst-plugins-good.tar.xz
$ cd gst-plugins-good
$ git cherry-pick 0421fb04470af90e8810e7e5e69955d3192896ba
Segmentation fault (core dumped)


Without local changes (e.g. after "git stash") it works fine. Also note
that the commit that is cherry-picked does not contain any changes to
files that have local changes.


Backtrace below:

Thread 1 "git" received signal SIGSEGV, Segmentation fault.
add_index_entry_with_check (option=0, ce=0x0, istate=0x555555993900 <the_index>) at read-cache.c:1012
1012	read-cache.c: No such file or directory.
(gdb) bt
#0  add_index_entry_with_check (option=0, ce=0x0, istate=0x555555993900 <the_index>) at read-cache.c:1012
#1  add_index_entry (istate=0x555555993900 <the_index>, ce=0x0, option=0) at read-cache.c:1061
#2  0x0000555555646df6 in merge_content (o=o@entry=0x7fffffffd550, 
    path=path@entry=0x555555a461c0 "docs/plugins/inspect/plugin-shout2send.xml", o_oid=<optimized out>, 
    o_oid@entry=0x555555a42adc, o_mode=o_mode@entry=33188, a_oid=a_oid@entry=0x555555a42af4, 
    a_mode=a_mode@entry=33188, b_oid=0x555555a42b0c, b_mode=33188, rename_conflict_info=0x555555a45fa0)
    at merge-recursive.c:1727
#3  0x0000555555647a1d in process_entry (entry=<optimized out>, path=<optimized out>, o=0x7fffffffd550)
    at merge-recursive.c:1885
#4  merge_trees (o=o@entry=0x7fffffffd550, head=head@entry=0x5555559b7c98, merge=<optimized out>, 
    merge@entry=0x5555559b7c70, common=<optimized out>, common@entry=0x5555559b7cc0, 
    result=result@entry=0x7fffffffd530) at merge-recursive.c:1948
#5  0x000055555568a248 in do_recursive_merge (opts=0x7fffffffdcc0, msgbuf=0x7fffffffd510, 
    head=0x7fffffffd620 "\246\256՝s8J\273ݵ\241y\303#j\277\211\266\\\n\377\177", next_label=<optimized out>, 
    base_label=<optimized out>, next=<optimized out>, base=<optimized out>) at sequencer.c:389
#6  do_pick_commit (command=TODO_PICK, commit=commit@entry=0x5555559a7c60, opts=opts@entry=0x7fffffffdcc0)
    at sequencer.c:757
#7  0x000055555568baa3 in single_pick (opts=0x7fffffffdcc0, cmit=0x5555559a7c60) at sequencer.c:1329
#8  sequencer_pick_revisions (opts=0x7fffffffdcc0) at sequencer.c:1378
#9  0x00005555555d34cf in run_sequencer (argc=1, argc@entry=2, argv=argv@entry=0x7fffffffe0c0, 
    opts=<optimized out>, opts@entry=0x7fffffffdcc0) at builtin/revert.c:178
#10 0x00005555555d3928 in cmd_cherry_pick (argc=2, argv=0x7fffffffe0c0, prefix=<optimized out>)
    at builtin/revert.c:203
#11 0x0000555555566205 in run_builtin (argv=<optimized out>, argc=<optimized out>, p=<optimized out>)
    at git.c:373
#12 handle_builtin (argc=2, argv=0x7fffffffe0c0) at git.c:572
#13 0x00005555555665a2 in run_argv (argv=0x7fffffffde60, argcp=0x7fffffffde6c) at git.c:630
#14 cmd_main (argc=<optimized out>, argv=<optimized out>) at git.c:707
#15 0x00005555555655d2 in main (argc=3, argv=0x7fffffffe0b8) at common-main.c:40

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

             reply	other threads:[~2017-06-15  9:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15  9:11 Sebastian Dröge [this message]
2017-06-15 10:32 ` [BUG] git cherry-pick segfaults with local changes in working directory Jeff King
2017-06-15 10:37   ` Sebastian Dröge
2017-06-15 13:03     ` Jeff King

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=1497517910.2239.105.camel@centricular.com \
    --to=sebastian@centricular.com \
    --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.