Subject: Bug: git push crashing

From: Pali Rohár <[email-masked]>
Date: Fri, 12 Apr 2013 20:50:25 +0200

Hello,

when I'm trying to push one specific branch from my git repository
to server, git push crashing. Pushing branch is rejected by server
(because non fast forward), but local git app should not crash.

I'm using git from ubuntu apt repository (compiled myself for debug
symbols), version git_1.7.10.4-1ubuntu1 on amd64 ubuntu system:
http://packages.ubuntu.com/source/quantal/git

Here are gdb backtrace and valgrind outputs. I changed server, repo
and branch strings from output. It looks like that git crashing in
strcmp function because one of arguments is NULL.

If you need more info, I can send it. This crash occur always. I can
reproduce it again and again...

$ valgrind --leak-check=full git push server:~/repo branch 
==19381== Memcheck, a memory error detector
==19381== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==19381== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==19381== Command: git push server:~/repo branch
==19381== 
X11 forwarding request failed on channel 0
To server:~/repo
 ! [rejected]        branch -> branch (non-fast-forward)
==19381== Invalid read of size 1
==19381==    at 0x4C2C831: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19381==    by 0x4DA2DD: transport_print_push_status (transport.c:747)
==19381==    by 0x4DAC19: transport_push (transport.c:1069)
==19381==    by 0x4515FC: push_with_options (push.c:191)
==19381==    by 0x451EF5: cmd_push (push.c:270)
==19381==    by 0x405787: handle_internal_command (git.c:308)
==19381==    by 0x404B91: main (git.c:513)
==19381==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==19381== 
==19381== 
==19381== Process terminating with default action of signal 11 (SIGSEGV)
==19381==  Access not within mapped region at address 0x0
==19381==    at 0x4C2C831: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19381==    by 0x4DA2DD: transport_print_push_status (transport.c:747)
==19381==    by 0x4DAC19: transport_push (transport.c:1069)
==19381==    by 0x4515FC: push_with_options (push.c:191)
==19381==    by 0x451EF5: cmd_push (push.c:270)
==19381==    by 0x405787: handle_internal_command (git.c:308)
==19381==    by 0x404B91: main (git.c:513)
==19381==  If you believe this happened as a result of a stack
==19381==  overflow in your program's main thread (unlikely but
==19381==  possible), you can try to increase the size of the
==19381==  main thread stack using the --main-stacksize= flag.
==19381==  The main thread stack size used in this run was 8388608.
==19381== 
==19381== HEAP SUMMARY:
==19381==     in use at exit: 7,672,224 bytes in 28,274 blocks
==19381==   total heap usage: 70,136 allocs, 41,862 frees, 108,300,058 bytes allocated
==19381== 
==19381== 43 (24 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 59
==19381==    at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19381==    by 0x4E4B28: xcalloc (wrapper.c:98)
==19381==    by 0x4BBCE9: parse_refspec_internal (remote.c:520)
==19381==    by 0x4BCE3E: match_push_refs (remote.c:653)
==19381==    by 0x4DAB3D: transport_push (transport.c:1047)
==19381==    by 0x4515FC: push_with_options (push.c:191)
==19381==    by 0x451EF5: cmd_push (push.c:270)
==19381==    by 0x405787: handle_internal_command (git.c:308)
==19381==    by 0x404B91: main (git.c:513)
==19381== 
==19381== 2,404 (110 direct, 2,294 indirect) bytes in 1 blocks are definitely lost in loss record 46 of 59
==19381==    at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19381==    by 0x4E4B28: xcalloc (wrapper.c:98)
==19381==    by 0x4BC241: one_local_ref (remote.c:1643)
==19381==    by 0x4B7B8C: do_for_each_ref (refs.c:750)
==19381==    by 0x4BDEF3: get_local_heads (remote.c:1654)
==19381==    by 0x4DAAF0: transport_push (transport.c:1032)
==19381==    by 0x4515FC: push_with_options (push.c:191)
==19381==    by 0x451EF5: cmd_push (push.c:270)
==19381==    by 0x405787: handle_internal_command (git.c:308)
==19381==    by 0x404B91: main (git.c:513)
==19381== 
==19381== LEAK SUMMARY:
==19381==    definitely lost: 134 bytes in 2 blocks
==19381==    indirectly lost: 2,313 bytes in 24 blocks
==19381==      possibly lost: 0 bytes in 0 blocks
==19381==    still reachable: 7,669,777 bytes in 28,248 blocks
==19381==         suppressed: 0 bytes in 0 blocks
==19381== Reachable blocks (those to which a pointer was found) are not shown.
==19381== To see them, rerun with: --leak-check=full --show-reachable=yes
==19381== 
==19381== For counts of detected and suppressed errors, rerun with: -v
==19381== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 2 from 2)

$ gdb --args git push server:~/repo branch 
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 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".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/git...done.
(gdb) r
Starting program: /usr/bin/git push server:\~/repo branch
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
X11 forwarding request failed on channel 0
To server:~/repo
 ! [rejected]        branch -> branch (non-fast-forward)

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163
163     ../sysdeps/x86_64/multiarch/strcmp-sse42.S: Adresár alebo súbor neexistuje.
(gdb) bt
#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163
#1  0x00000000004da2de in transport_print_push_status (dest=0x7fffffffe20b "server:~/repo", refs=<optimized out>, 
verbose=verbose@entry=0, porcelain=porcelain@entry=0, 
    nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:747
#2  0x00000000004dac1a in transport_push (transport=transport@entry=0x79cbd0, refspec_nr=<optimized out>, 
refspec=<optimized out>, flags=flags@entry=0, nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:1069
#3  0x00000000004515fd in push_with_options (transport=0x79cbd0, flags=flags@entry=0) at builtin/push.c:191
#4  0x0000000000451ef6 in do_push (flags=0, repo=<optimized out>) at builtin/push.c:270
#5  cmd_push (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>) at builtin/push.c:346
#6  0x0000000000405788 in run_builtin (argv=0x7fffffffde50, argc=3, p=0x744dc8 <commands.11293+1704>) at git.c:308
#7  handle_internal_command (argc=3, argv=0x7fffffffde50) at git.c:467
#8  0x0000000000404b92 in run_argv (argv=0x7fffffffdce0, argcp=0x7fffffffdcec) at git.c:513
#9  main (argc=3, argv=0x7fffffffde50) at git.c:588
(gdb) bt full
#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163
No locals.
#1  0x00000000004da2de in transport_print_push_status (dest=0x7fffffffe20b "server:~/repo", refs=<optimized out>, 
verbose=verbose@entry=0, porcelain=porcelain@entry=0, 
    nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:747
        ref = 0x79e740
        n = 1
        head_sha1 = " \315y\000\000\000\000\000P\314y\000\000\000\000\000\377\377\377\377"
        head = 0x0
#2  0x00000000004dac1a in transport_push (transport=transport@entry=0x79cbd0, refspec_nr=<optimized out>, 
refspec=<optimized out>, flags=flags@entry=0, nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:1069
        remote_refs = 0x79cd20
        local_refs = <optimized out>
        verbose = 0
        porcelain = 0
        push_ret = -1
        ret = -1
        match_flags = 0
        quiet = 0
        pretend = 0
#3  0x00000000004515fd in push_with_options (transport=0x79cbd0, flags=flags@entry=0) at builtin/push.c:191
        err = <optimized out>
        nonfastforward = <optimized out>
#4  0x0000000000451ef6 in do_push (flags=0, repo=<optimized out>) at builtin/push.c:270
        transport = <optimized out>
        i = <optimized out>
        errs = <optimized out>
        remote = 0x79c700
        url = <optimized out>
        url_nr = 0
#5  cmd_push (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>) at builtin/push.c:346
        flags = 0
        tags = 0
        rc = 0
        repo = 0x7fffffffe20b "server:~/repo"
        options = {{type = OPTION_CALLBACK, short_name = 118, long_name = 0x4f5a0a "verbose", value = 0x7673a0 <verbosity>, 
argh = 0x0, help = 0x4fab02 "be more verbose", flags = 2, 
            callback = 0x4aa900 <parse_opt_verbosity_cb>, defval = 0}, {type = OPTION_CALLBACK, short_name = 113, long_name = 
0x5028aa "quiet", value = 0x7673a0 <verbosity>, argh = 0x0, help = 0x4fab12 "be more quiet", 
            flags = 2, callback = 0x4aa900 <parse_opt_verbosity_cb>, defval = 0}, {type = OPTION_STRING, short_name = 0, long_name = 
0x4f75fc "repo", value = 0x7fffffffd738, argh = 0x4f633d "repository", 
            help = 0x4f633d "repository", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_BIT, short_name = 0, long_name = 
0x4fcac6 "all", value = 0x7fffffffd730, argh = 0x0, help = 0x5083a3 "push all refs", 
            flags = 2, callback = 0x0, defval = 1}, {type = OPTION_BIT, short_name = 0, long_name = 0x50cada "mirror", value = 
0x7fffffffd730, argh = 0x0, help = 0x5083b1 "mirror all refs", flags = 2, callback = 0x0, 
            defval = 10}, {type = OPTION_COUNTUP, short_name = 0, long_name = 0x509491 "delete", value = 0x7673a4 <deleterefs>, 
argh = 0x0, help = 0x5083c1 "delete refs", flags = 2, callback = 0x0, defval = 0}, {
            type = OPTION_COUNTUP, short_name = 0, long_name = 0x50de98 "tags", value = 0x7fffffffd734, argh = 0x0, help = 
0x508488 "push tags (can't be used with --all or --mirror)", flags = 2, callback = 0x0, defval = 0}, 
          {type = OPTION_BIT, short_name = 110, long_name = 0x4ff33b "dry-run", value = 0x7fffffffd730, argh = 0x0, help = 0x4f59ff 
"dry run", flags = 2, callback = 0x0, defval = 4}, {type = OPTION_BIT, short_name = 0, 
            long_name = 0x51d610 "porcelain", value = 0x7fffffffd730, argh = 0x0, help = 0x4fb848 "machine-readable output", flags = 
2, callback = 0x0, defval = 16}, {type = OPTION_BIT, short_name = 102, 
            long_name = 0x4ff35e "force", value = 0x7fffffffd730, argh = 0x0, help = 0x5083cd "force updates", flags = 2, callback = 
0x0, defval = 2}, {type = OPTION_CALLBACK, short_name = 0, 
            long_name = 0x4ff366 "recurse-submodules", value = 0x7fffffffd730, argh = 0x50c7b7 "check", help = 0x5084c0 "controls 
recursive pushing of submodules", flags = 1, 
            callback = 0x451510 <option_parse_recurse_submodules>, defval = 0}, {type = OPTION_COUNTUP, short_name = 0, 
long_name = 0x4fefd4 "thin", value = 0x7673a8 <thin>, argh = 0x0, help = 0x5083db "use thin pack", 
            flags = 2, callback = 0x0, defval = 0}, {type = OPTION_STRING, short_name = 0, long_name = 0x50ca97 "receive-pack", value 
= 0x7673b0 <receivepack>, argh = 0x50ca97 "receive-pack", 
            help = 0x5083e9 "receive pack program", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_STRING, short_name = 0, 
long_name = 0x4f7601 "exec", value = 0x7673b0 <receivepack>, argh = 0x50ca97 "receive-pack", 
            help = 0x5083e9 "receive pack program", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_BIT, short_name = 117, 
long_name = 0x4f879d "set-upstream", value = 0x7fffffffd730, argh = 0x0, 
            help = 0x5084f0 "set upstream for git pull/status", flags = 2, callback = 0x0, defval = 32}, {type = OPTION_SET_INT, 
short_name = 0, long_name = 0x500799 "progress", value = 0x7489b4 <progress>, argh = 0x0, 
            help = 0x4fab20 "force progress reporting", flags = 2, callback = 0x0, defval = 1}, {type = OPTION_BIT, short_name = 0, 
long_name = 0x50a386 "prune", value = 0x7fffffffd730, argh = 0x0, 
            help = 0x5083fe "prune locally removed refs", flags = 2, callback = 0x0, defval = 128}, {type = OPTION_END, short_name = 0, 
long_name = 0x0, value = 0x0, argh = 0x0, help = 0x0, flags = 0, callback = 0x0, 
---Type <return> to continue, or q <return> to quit---
            defval = 0}}
#6  0x0000000000405788 in run_builtin (argv=0x7fffffffde50, argc=3, p=0x744dc8 <commands.11293+1704>) at git.c:308
        status = <optimized out>
        help = <optimized out>
        st = {st_dev = 140737341403408, st_ino = 140737488346288, st_nlink = 0, st_mode = 4214692, st_uid = 0, st_gid = 
4294958656, __pad0 = 32767, st_rdev = 4294967296, st_size = 0, st_blksize = 140737488346968, 
          st_blocks = 7979280, st_atim = {tv_sec = 140737488346288, tv_nsec = 0}, st_mtim = {tv_sec = 4214692, tv_nsec = 
140737488346688}, st_ctim = {tv_sec = 140737488347654, tv_nsec = 0}, __unused = {5056825, 
            140737488350098, 4790338}}
        prefix = <optimized out>
#7  handle_internal_command (argc=3, argv=0x7fffffffde50) at git.c:467
        p = 0x744dc8 <commands.11293+1704>
        cmd = <optimized out>
        commands = {{cmd = 0x50a441 "add", fn = 0x405e70 <cmd_add>, option = 9}, {cmd = 0x4f51e5 "annotate", fn = 0x406990 
<cmd_annotate>, option = 1}, {cmd = 0x4f5a57 "apply", fn = 0x40da30 <cmd_apply>, option = 2}, {
            cmd = 0x4f7566 "archive", fn = 0x40e800 <cmd_archive>, option = 0}, {cmd = 0x4f51ee "bisect--helper", fn = 0x40ea10 
<cmd_bisect__helper>, option = 1}, {cmd = 0x4f51fd "blame", fn = 0x410920 <cmd_blame>, 
            option = 1}, {cmd = 0x50a618 "branch", fn = 0x413cc0 <cmd_branch>, option = 1}, {cmd = 0x4faa45 "bundle", fn = 
0x415250 <cmd_bundle>, option = 2}, {cmd = 0x4f5203 "cat-file", fn = 0x415550 <cmd_cat_file>, 
            option = 1}, {cmd = 0x4f520c "check-attr", fn = 0x415fc0 <cmd_check_attr>, option = 1}, {cmd = 0x4f5217 "check-ref-
format", fn = 0x416380 <cmd_check_ref_format>, option = 0}, {cmd = 0x4fab48 "checkout", 
            fn = 0x417a00 <cmd_checkout>, option = 9}, {cmd = 0x4f5228 "checkout-index", fn = 0x416a80 <cmd_checkout_index>, 
option = 9}, {cmd = 0x51adf8 "cherry", fn = 0x43abb0 <cmd_cherry>, option = 1}, {
            cmd = 0x51ae17 "cherry-pick", fn = 0x45eda0 <cmd_cherry_pick>, option = 9}, {cmd = 0x4f5237 "clean", fn = 0x41a070 
<cmd_clean>, option = 9}, {cmd = 0x4f523d "clone", fn = 0x41b030 <cmd_clone>, option = 0}, {
            cmd = 0x4fb693 "commit", fn = 0x41ee70 <cmd_commit>, option = 9}, {cmd = 0x4f5243 "commit-tree", fn = 0x41c550 
<cmd_commit_tree>, option = 1}, {cmd = 0x4f542f "config", fn = 0x420e20 <cmd_config>, option = 2}, {
            cmd = 0x4f524f "count-objects", fn = 0x4215f0 <cmd_count_objects>, option = 1}, {cmd = 0x4f525d "describe", fn = 
0x4227c0 <cmd_describe>, option = 1}, {cmd = 0x51328b "diff", fn = 0x423870 <cmd_diff>, 
            option = 0}, {cmd = 0x4f5266 "diff-files", fn = 0x422de0 <cmd_diff_files>, option = 9}, {cmd = 0x4f5271 "diff-index", fn = 
0x423020 <cmd_diff_index>, option = 1}, {cmd = 0x4f527c "diff-tree", 
            fn = 0x4231b0 <cmd_diff_tree>, option = 1}, {cmd = 0x51e3ea "fast-export", fn = 0x424cb0 <cmd_fast_export>, option = 
1}, {cmd = 0x4faaac "fetch", fn = 0x42a0a0 <cmd_fetch>, option = 1}, {
            cmd = 0x4f5286 "fetch-pack", fn = 0x4277c0 <cmd_fetch_pack>, option = 1}, {cmd = 0x4f5291 "fmt-merge-msg", fn = 
0x42b920 <cmd_fmt_merge_msg>, option = 1}, {cmd = 0x4f529f "for-each-ref", 
            fn = 0x42d5e0 <cmd_for_each_ref>, option = 1}, {cmd = 0x4f52ac "format-patch", fn = 0x439170 <cmd_format_patch>, 
option = 1}, {cmd = 0x51480e "fsck", fn = 0x42e820 <cmd_fsck>, option = 1}, {
            cmd = 0x4f52b9 "fsck-objects", fn = 0x42e820 <cmd_fsck>, option = 1}, {cmd = 0x500a98 "gc", fn = 0x42f480 <cmd_gc>, 
option = 1}, {cmd = 0x4f52c6 "get-tar-commit-id", fn = 0x465970 <cmd_get_tar_commit_id>, 
            option = 0}, {cmd = 0x500f09 "grep", fn = 0x430700 <cmd_grep>, option = 2}, {cmd = 0x4f52d8 "hash-object", fn = 
0x432400 <cmd_hash_object>, option = 0}, {cmd = 0x4f4fc6 "help", fn = 0x4330b0 <cmd_help>, 
            option = 0}, {cmd = 0x4f52e4 "index-pack", fn = 0x434880 <cmd_index_pack>, option = 2}, {cmd = 0x4fac0c "init", fn = 
0x436fe0 <cmd_init_db>, option = 0}, {cmd = 0x4f52ef "init-db", fn = 0x436fe0 <cmd_init_db>, 
            option = 0}, {cmd = 0x519de7 "log", fn = 0x439090 <cmd_log>, option = 1}, {cmd = 0x4f52f7 "ls-files", fn = 0x43b6d0 
<cmd_ls_files>, option = 1}, {cmd = 0x4f5300 "ls-remote", fn = 0x43c890 <cmd_ls_remote>, 
            option = 2}, {cmd = 0x4f530a "ls-tree", fn = 0x43d080 <cmd_ls_tree>, option = 1}, {cmd = 0x4f5312 "mailinfo", fn = 
0x43e9b0 <cmd_mailinfo>, option = 0}, {cmd = 0x4f531b "mailsplit", 
            fn = 0x43fce0 <cmd_mailsplit>, option = 0}, {cmd = 0x50551f "merge", fn = 0x441da0 <cmd_merge>, option = 9}, {cmd = 
0x4f5325 "merge-base", fn = 0x443b90 <cmd_merge_base>, option = 1}, {
            cmd = 0x4f5330 "merge-file", fn = 0x443ed0 <cmd_merge_file>, option = 2}, {cmd = 0x4f533b "merge-index", fn = 
0x444610 <cmd_merge_index>, option = 1}, {cmd = 0x4f5347 "merge-ours", 
            fn = 0x444820 <cmd_merge_ours>, option = 1}, {cmd = 0x4f5352 "merge-recursive", fn = 0x4448b0 
<cmd_merge_recursive>, option = 9}, {cmd = 0x4f5362 "merge-recursive-ours", fn = 0x4448b0 <cmd_merge_recursive>, 
            option = 9}, {cmd = 0x4f5377 "merge-recursive-theirs", fn = 0x4448b0 <cmd_merge_recursive>, option = 9}, {cmd = 
0x4f538e "merge-subtree", fn = 0x4448b0 <cmd_merge_recursive>, option = 9}, {
            cmd = 0x4f539c "merge-tree", fn = 0x4450a0 <cmd_merge_tree>, option = 1}, {cmd = 0x4f53a7 "mktag", fn = 0x445410 
<cmd_mktag>, option = 1}, {cmd = 0x4f53ad "mktree", fn = 0x4459a0 <cmd_mktree>, option = 1}, {
            cmd = 0x4f53b4 "mv", fn = 0x446110 <cmd_mv>, option = 9}, {cmd = 0x4f53b7 "name-rev", fn = 0x447010 
<cmd_name_rev>, option = 1}, {cmd = 0x506456 "notes", fn = 0x4488e0 <cmd_notes>, option = 1}, {
            cmd = 0x510a0f "pack-objects", fn = 0x44cb90 <cmd_pack_objects>, option = 1}, {cmd = 0x4f53c0 "pack-redundant", fn = 
0x44f430 <cmd_pack_redundant>, option = 1}, {cmd = 0x4f53cf "pack-refs", 
            fn = 0x450460 <cmd_pack_refs>, option = 1}, {cmd = 0x4f53d9 "patch-id", fn = 0x450530 <cmd_patch_id>, option = 0}, 
{cmd = 0x4f53e2 "peek-remote", fn = 0x43c890 <cmd_ls_remote>, option = 2}, {
            cmd = 0x4f53ee "pickaxe", fn = 0x410920 <cmd_blame>, option = 1}, {cmd = 0x50a386 "prune", fn = 0x450ec0 
<cmd_prune>, option = 1}, {cmd = 0x4f53f6 "prune-packed", fn = 0x450ca0 <cmd_prune_packed>, option = 1}, {
            cmd = 0x51ddc8 "push", fn = 0x451730 <cmd_push>, option = 1}, {cmd = 0x4f5403 "read-tree", fn = 0x452350 
<cmd_read_tree>, option = 1}, {cmd = 0x50ca97 "receive-pack", fn = 0x453960 <cmd_receive_pack>, 
            option = 0}, {cmd = 0x4f884c "reflog", fn = 0x4562b0 <cmd_reflog>, option = 1}, {cmd = 0x50a234 "remote", fn = 0x4577e0 
<cmd_remote>, option = 1}, {cmd = 0x4f540d "remote-ext", fn = 0x45a740 <cmd_remote_ext>, 
            option = 0}, {cmd = 0x4f5418 "remote-fd", fn = 0x45a8e0 <cmd_remote_fd>, option = 0}, {cmd = 0x4f5422 "replace", fn = 
0x45acb0 <cmd_replace>, option = 1}, {cmd = 0x4f542a "repo-config", 
            fn = 0x421590 <cmd_repo_config>, option = 2}, {cmd = 0x4f5436 "rerere", fn = 0x45af10 <cmd_rerere>, option = 1}, {cmd 
= 0x50433e "reset", fn = 0x45b890 <cmd_reset>, option = 1}, {cmd = 0x4f543d "rev-list", 
            fn = 0x45c6e0 <cmd_rev_list>, option = 1}, {cmd = 0x4f5446 "rev-parse", fn = 0x45d020 <cmd_rev_parse>, option = 0}, 
{cmd = 0x4f5450 "revert", fn = 0x45ed10 <cmd_revert>, option = 9}, {cmd = 0x4f5457 "rm", 
            fn = 0x45ee20 <cmd_rm>, option = 1}, {cmd = 0x4f545a "send-pack", fn = 0x460100 <cmd_send_pack>, option = 1}, {cmd = 
0x4f5464 "shortlog", fn = 0x461440 <cmd_shortlog>, option = 6}, {cmd = 0x4f546d "show", 
            fn = 0x438be0 <cmd_show>, option = 1}, {cmd = 0x4f5472 "show-branch", fn = 0x4620d0 <cmd_show_branch>, option = 1}, 
{cmd = 0x4f547e "show-ref", fn = 0x463af0 <cmd_show_ref>, option = 1}, {cmd = 0x4f5487 "stage", 
            fn = 0x405e70 <cmd_add>, option = 9}, {cmd = 0x50c9c4 "status", fn = 0x41ec40 <cmd_status>, option = 9}, {cmd = 
0x4f548d "stripspace", fn = 0x463e90 <cmd_stripspace>, option = 0}, {cmd = 0x4f5498 "symbolic-ref", 
            fn = 0x463f50 <cmd_symbolic_ref>, option = 1}, {cmd = 0x51d96d "tag", fn = 0x464920 <cmd_tag>, option = 1}, {cmd = 
0x4f54a5 "tar-tree", fn = 0x4657e0 <cmd_tar_tree>, option = 0}, {cmd = 0x4f54ae "unpack-file", 
            fn = 0x465a50 <cmd_unpack_file>, option = 1}, {cmd = 0x4f54ba "unpack-objects", fn = 0x466440 <cmd_unpack_objects>, 
option = 1}, {cmd = 0x4f54c9 "update-index", fn = 0x468400 <cmd_update_index>, option = 1}, {
            cmd = 0x4f54d6 "update-ref", fn = 0x468f00 <cmd_update_ref>, option = 1}, {cmd = 0x4f54e1 "update-server-info", fn = 
0x469190 <cmd_update_server_info>, option = 1}, {cmd = 0x4f755f "upload-archive", 
            fn = 0x469490 <cmd_upload_archive>, option = 0}, {cmd = 0x4f54f4 "upload-archive--writer", fn = 0x4692d0 
<cmd_upload_archive_writer>, option = 0}, {cmd = 0x4f550b "var", fn = 0x4696b0 <cmd_var>, option = 2}, {
            cmd = 0x4f550f "verify-pack", fn = 0x4697b0 <cmd_verify_pack>, option = 0}, {cmd = 0x4f551b "verify-tag", fn = 0x469b60 
<cmd_verify_tag>, option = 1}, {cmd = 0x5167b6 "version", fn = 0x497a30 <cmd_version>, 
            option = 0}, {cmd = 0x4f5526 "whatchanged", fn = 0x438ae0 <cmd_whatchanged>, option = 1}, {cmd = 0x50f5d5 "write-
tree", fn = 0x469dc0 <cmd_write_tree>, option = 1}}
---Type <return> to continue, or q <return> to quit---
        i = <optimized out>
#8  0x0000000000404b92 in run_argv (argv=0x7fffffffdce0, argcp=0x7fffffffdcec) at git.c:513
        done_alias = 0
#9  main (argc=3, argv=0x7fffffffde50) at git.c:588
        done_help = 0
        was_alias = 0
        cmd = 0x7fffffffe206 "push"
(gdb) quit

-- 
Pali Rohár
[email-masked]