Package: git-core
Version: 1:1.6.3.1-1.1yarikdebug1
Severity: normal

At first I thought that I hit the same #522750 but it was seems to be
different and that one is not about the same usecase.

I had local repo, where I removed all previous remotes and was about to push to
a freshly added remote, which was only initiated, ie empty. The following crash
occurs on

 remote show alioth

$> git debug remote show alioth
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) c
The program is not being run.
(gdb) r
Starting program: /usr/bin/git remote show alioth
[Thread debugging using libthread_db enabled]
[New Thread 0x7feb12958710 (LWP 4119)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7feb12958710 (LWP 4119)]
0x000000000044b160 in get_push_ref_states (remote_refs=0x0, 
states=0x7fff1a985610) at builtin-remote.c:303
303             while (ref->next)
(gdb) bt
#0  0x000000000044b160 in get_push_ref_states (remote_refs=0x0, 
states=0x7fff1a985610) at builtin-remote.c:303
#1  0x000000000044cb18 in get_remote_ref_states (name=0x7fff1a98752a "alioth", 
states=0x7fff1a985610, query=7) at builtin-remote.c:803
#2  0x000000000044d2db in show (argc=1, argv=0x7fff1a985aa0) at 
builtin-remote.c:1004
#3  0x000000000044e474 in cmd_remote (argc=2, argv=0x7fff1a985aa0, prefix=0x0) 
at builtin-remote.c:1323
#4  0x0000000000404e2c in run_builtin (p=0x719f30, argc=3, argv=0x7fff1a985aa0) 
at git.c:247
#5  0x0000000000404fdd in handle_internal_command (argc=3, argv=0x7fff1a985aa0) 
at git.c:392
#6  0x00000000004050eb in run_argv (argcp=0x7fff1a9859a4, argv=0x7fff1a985998) 
at git.c:438
#7  0x000000000040523c in main (argc=3, argv=0x7fff1a985aa0) at git.c:509
(gdb) bt full 3
#0  0x000000000044b160 in get_push_ref_states (remote_refs=0x0, 
states=0x7fff1a985610) at builtin-remote.c:303
        remote = (struct remote *) 0x1c4f150
        ref = (struct ref *) 0x0
        local_refs = (struct ref *) 0x1c4f4d0
        push_map = (struct ref *) 0x0
        push_tail = (struct ref **) 0x4e9773
#1  0x000000000044cb18 in get_remote_ref_states (name=0x7fff1a98752a "alioth", 
states=0x7fff1a985610, query=7) at builtin-remote.c:803
        transport = (struct transport *) 0x1c4ec80
        remote_refs = (const struct ref *) 0x0
#2  0x000000000044d2db in show (argc=1, argv=0x7fff1a985aa0) at 
builtin-remote.c:1004
        i = 32747
        no_query = 0
        result = 0
        query_flag = 7
        options = {{type = OPTION_GROUP, short_name = 0, long_name = 0x0, value 
= 0x0, argh = 0x0, help = 0x4e9bb8 "show specific options", flags = 0, callback 
= 0, defval = 0}, {type = OPTION_BOOLEAN, 
    short_name = 110, long_name = 0x0, value = 0x7fff1a985760, argh = 0x0, help 
= 0x4e9bce "do not query remotes", flags = 0, callback = 0, defval = 0}, {type 
= OPTION_END, short_name = 0, long_name = 0x0, value = 0x0, 
    argh = 0x0, help = 0x0, flags = 0, callback = 0, defval = 0}}
        states = {remote = 0x1c4f150, new = {items = 0x0, nr = 0, alloc = 0, 
strdup_strings = 1}, stale = {items = 0x0, nr = 0, alloc = 0, strdup_strings = 
0}, tracked = {items = 0x0, nr = 0, alloc = 0, 
    strdup_strings = 1}, heads = {items = 0x0, nr = 0, alloc = 0, 
strdup_strings = 1}, push = {items = 0x0, nr = 0, alloc = 0, strdup_strings = 
0}, queried = 1}
        info_list = {items = 0x0, nr = 0, alloc = 0, strdup_strings = 0}
        info = {list = 0x7fff1a9855f0, states = 0x7fff1a985610, width = 0, 
width2 = 0, any_rebase = 0}
(More stack frames follow...)

(gdb) l
298             if (remote->mirror)
299                     return 0;
300     
301             local_refs = get_local_heads();
302             ref = push_map = copy_ref_list(remote_refs);
303             while (ref->next)
304                     ref = ref->next;
305             push_tail = &ref->next;
306     
307             match_refs(local_refs, push_map, &push_tail, 
remote->push_refspec_nr,

So, ref is dereferenced although it is 0x0, I guess we are missing 1 more
condition ;)

Just for the reference and completeness:

$> cat .git/config 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        autocrlf = false
[svn-remote "svn"]
        url = https://psychopy.googlecode.com/svn
        fetch = trunk:refs/remotes/svn/trunk
        branches = branches/*:refs/remotes/svn/*
        tags = tags/*:refs/remotes/svn/tags/*
[branch "debian"]
[branch "master-v2"]
        remote = .
        merge = refs/remotes/svn/v2
[remote "alioth"]
        url = ssh://alioth.debian.org/git/pkg-exppsy/psychopy2.git
        fetch = +refs/heads/*:refs/remotes/alioth/*


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (900, 'testing'), (600, 'unstable'), (300, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages git-core depends on:
ii  libc6                  2.9-4             GNU C Library: Shared libraries
ii  libcurl3-gnutls        7.18.2-8.1        Multi-protocol file transfer libra
ii  libdigest-sha1-perl    2.11-2+b1         NIST SHA-1 message digest algorith
ii  liberror-perl          0.17-1            Perl module for error/exception ha
ii  libexpat1              2.0.1-4           XML parsing C library - runtime li
ii  perl-modules           5.10.0-22         Core Perl modules
ii  zlib1g                 1:1.2.3.3.dfsg-13 compression library - runtime

Versions of packages git-core recommends:
ii  less                        429-2        pager program similar to more
ii  openssh-client [ssh-client] 1:5.1p1-5+b1 secure shell client, an rlogin/rsh
ii  patch                       2.5.9-5      Apply a diff file to an original
ii  rsync                       3.0.5-1      fast remote file copy program (lik

Versions of packages git-core suggests:
pn  git-arch        <none>                   (no description available)
pn  git-cvs         <none>                   (no description available)
pn  git-daemon-run  <none>                   (no description available)
ii  git-doc         1:1.6.2.4-1              fast, scalable, distributed revisi
pn  git-email       <none>                   (no description available)
ii  git-gui         1:1.6.3.1-1.1yarikdebug1 fast, scalable, distributed revisi
ii  git-svn         1:1.6.3.1-1.1yarikdebug1 fast, scalable, distributed revisi
ii  gitk            1:1.6.3.1-1.1yarikdebug1 fast, scalable, distributed revisi
pn  gitweb          <none>                   (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to