{"thread":{"id":"33493","subject":"Bug: git push crashing","startedAt":"2013-04-12T18:50:25Z","lastAt":"2013-04-12T19:32:59Z","messageCount":3,"participants":["Pali Rohár","John Keeping"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"214087","messageId":"201304122050.26471@pali","threadId":"33493","inReplyTo":null,"subject":"Bug: git push crashing","fromName":"Pali Rohár","fromEmail":"pali.rohar@gmail.com","sentAt":"2013-04-12T18:50:25Z","receivedAt":"2013-04-12T18:50:25Z","isPatch":false,"sender":{"key":"pali.rohar@gmail.com","avatar":null},"body":"Hello,\n\nwhen I'm trying to push one specific branch from my git repository\nto server, git push crashing. Pushing branch is rejected by server\n(because non fast forward), but local git app should not crash.\n\nI'm using git from ubuntu apt repository (compiled myself for debug\nsymbols), version git_1.7.10.4-1ubuntu1 on amd64 ubuntu system:\nhttp://packages.ubuntu.com/source/quantal/git\n\nHere are gdb backtrace and valgrind outputs. I changed server, repo\nand branch strings from output. It looks like that git crashing in\nstrcmp function because one of arguments is NULL.\n\nIf you need more info, I can send it. This crash occur always. I can\nreproduce it again and again...\n\n$ valgrind --leak-check=full git push server:~/repo branch \n==19381== Memcheck, a memory error detector\n==19381== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.\n==19381== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info\n==19381== Command: git push server:~/repo branch\n==19381== \nX11 forwarding request failed on channel 0\nTo server:~/repo\n ! [rejected]        branch -> branch (non-fast-forward)\n==19381== Invalid read of size 1\n==19381==    at 0x4C2C831: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\n==19381==    by 0x4DA2DD: transport_print_push_status (transport.c:747)\n==19381==    by 0x4DAC19: transport_push (transport.c:1069)\n==19381==    by 0x4515FC: push_with_options (push.c:191)\n==19381==    by 0x451EF5: cmd_push (push.c:270)\n==19381==    by 0x405787: handle_internal_command (git.c:308)\n==19381==    by 0x404B91: main (git.c:513)\n==19381==  Address 0x0 is not stack'd, malloc'd or (recently) free'd\n==19381== \n==19381== \n==19381== Process terminating with default action of signal 11 (SIGSEGV)\n==19381==  Access not within mapped region at address 0x0\n==19381==    at 0x4C2C831: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\n==19381==    by 0x4DA2DD: transport_print_push_status (transport.c:747)\n==19381==    by 0x4DAC19: transport_push (transport.c:1069)\n==19381==    by 0x4515FC: push_with_options (push.c:191)\n==19381==    by 0x451EF5: cmd_push (push.c:270)\n==19381==    by 0x405787: handle_internal_command (git.c:308)\n==19381==    by 0x404B91: main (git.c:513)\n==19381==  If you believe this happened as a result of a stack\n==19381==  overflow in your program's main thread (unlikely but\n==19381==  possible), you can try to increase the size of the\n==19381==  main thread stack using the --main-stacksize= flag.\n==19381==  The main thread stack size used in this run was 8388608.\n==19381== \n==19381== HEAP SUMMARY:\n==19381==     in use at exit: 7,672,224 bytes in 28,274 blocks\n==19381==   total heap usage: 70,136 allocs, 41,862 frees, 108,300,058 bytes allocated\n==19381== \n==19381== 43 (24 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 59\n==19381==    at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\n==19381==    by 0x4E4B28: xcalloc (wrapper.c:98)\n==19381==    by 0x4BBCE9: parse_refspec_internal (remote.c:520)\n==19381==    by 0x4BCE3E: match_push_refs (remote.c:653)\n==19381==    by 0x4DAB3D: transport_push (transport.c:1047)\n==19381==    by 0x4515FC: push_with_options (push.c:191)\n==19381==    by 0x451EF5: cmd_push (push.c:270)\n==19381==    by 0x405787: handle_internal_command (git.c:308)\n==19381==    by 0x404B91: main (git.c:513)\n==19381== \n==19381== 2,404 (110 direct, 2,294 indirect) bytes in 1 blocks are definitely lost in loss record 46 of 59\n==19381==    at 0x4C29E46: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)\n==19381==    by 0x4E4B28: xcalloc (wrapper.c:98)\n==19381==    by 0x4BC241: one_local_ref (remote.c:1643)\n==19381==    by 0x4B7B8C: do_for_each_ref (refs.c:750)\n==19381==    by 0x4BDEF3: get_local_heads (remote.c:1654)\n==19381==    by 0x4DAAF0: transport_push (transport.c:1032)\n==19381==    by 0x4515FC: push_with_options (push.c:191)\n==19381==    by 0x451EF5: cmd_push (push.c:270)\n==19381==    by 0x405787: handle_internal_command (git.c:308)\n==19381==    by 0x404B91: main (git.c:513)\n==19381== \n==19381== LEAK SUMMARY:\n==19381==    definitely lost: 134 bytes in 2 blocks\n==19381==    indirectly lost: 2,313 bytes in 24 blocks\n==19381==      possibly lost: 0 bytes in 0 blocks\n==19381==    still reachable: 7,669,777 bytes in 28,248 blocks\n==19381==         suppressed: 0 bytes in 0 blocks\n==19381== Reachable blocks (those to which a pointer was found) are not shown.\n==19381== To see them, rerun with: --leak-check=full --show-reachable=yes\n==19381== \n==19381== For counts of detected and suppressed errors, rerun with: -v\n==19381== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 2 from 2)\n\n\n$ gdb --args git push server:~/repo branch \nGNU gdb (GDB) 7.5-ubuntu\nCopyright (C) 2012 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-linux-gnu\".\nFor bug reporting instructions, please see:\n<http://www.gnu.org/software/gdb/bugs/>...\nReading symbols from /usr/bin/git...done.\n(gdb) r\nStarting program: /usr/bin/git push server:\\~/repo branch\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\nX11 forwarding request failed on channel 0\nTo server:~/repo\n ! [rejected]        branch -> branch (non-fast-forward)\n\nProgram received signal SIGSEGV, Segmentation fault.\n__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163\n163     ../sysdeps/x86_64/multiarch/strcmp-sse42.S: Adresár alebo súbor neexistuje.\n(gdb) bt\n#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163\n#1  0x00000000004da2de in transport_print_push_status (dest=0x7fffffffe20b \"server:~/repo\", refs=<optimized out>, \nverbose=verbose@entry=0, porcelain=porcelain@entry=0, \n    nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:747\n#2  0x00000000004dac1a in transport_push (transport=transport@entry=0x79cbd0, refspec_nr=<optimized out>, \nrefspec=<optimized out>, flags=flags@entry=0, nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:1069\n#3  0x00000000004515fd in push_with_options (transport=0x79cbd0, flags=flags@entry=0) at builtin/push.c:191\n#4  0x0000000000451ef6 in do_push (flags=0, repo=<optimized out>) at builtin/push.c:270\n#5  cmd_push (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>) at builtin/push.c:346\n#6  0x0000000000405788 in run_builtin (argv=0x7fffffffde50, argc=3, p=0x744dc8 <commands.11293+1704>) at git.c:308\n#7  handle_internal_command (argc=3, argv=0x7fffffffde50) at git.c:467\n#8  0x0000000000404b92 in run_argv (argv=0x7fffffffdce0, argcp=0x7fffffffdcec) at git.c:513\n#9  main (argc=3, argv=0x7fffffffde50) at git.c:588\n(gdb) bt full\n#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:163\nNo locals.\n#1  0x00000000004da2de in transport_print_push_status (dest=0x7fffffffe20b \"server:~/repo\", refs=<optimized out>, \nverbose=verbose@entry=0, porcelain=porcelain@entry=0, \n    nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:747\n        ref = 0x79e740\n        n = 1\n        head_sha1 = \" \\315y\\000\\000\\000\\000\\000P\\314y\\000\\000\\000\\000\\000\\377\\377\\377\\377\"\n        head = 0x0\n#2  0x00000000004dac1a in transport_push (transport=transport@entry=0x79cbd0, refspec_nr=<optimized out>, \nrefspec=<optimized out>, flags=flags@entry=0, nonfastforward=nonfastforward@entry=0x7fffffffd6fc) at transport.c:1069\n        remote_refs = 0x79cd20\n        local_refs = <optimized out>\n        verbose = 0\n        porcelain = 0\n        push_ret = -1\n        ret = -1\n        match_flags = 0\n        quiet = 0\n        pretend = 0\n#3  0x00000000004515fd in push_with_options (transport=0x79cbd0, flags=flags@entry=0) at builtin/push.c:191\n        err = <optimized out>\n        nonfastforward = <optimized out>\n#4  0x0000000000451ef6 in do_push (flags=0, repo=<optimized out>) at builtin/push.c:270\n        transport = <optimized out>\n        i = <optimized out>\n        errs = <optimized out>\n        remote = 0x79c700\n        url = <optimized out>\n        url_nr = 0\n#5  cmd_push (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>) at builtin/push.c:346\n        flags = 0\n        tags = 0\n        rc = 0\n        repo = 0x7fffffffe20b \"server:~/repo\"\n        options = {{type = OPTION_CALLBACK, short_name = 118, long_name = 0x4f5a0a \"verbose\", value = 0x7673a0 <verbosity>, \nargh = 0x0, help = 0x4fab02 \"be more verbose\", flags = 2, \n            callback = 0x4aa900 <parse_opt_verbosity_cb>, defval = 0}, {type = OPTION_CALLBACK, short_name = 113, long_name = \n0x5028aa \"quiet\", value = 0x7673a0 <verbosity>, argh = 0x0, help = 0x4fab12 \"be more quiet\", \n            flags = 2, callback = 0x4aa900 <parse_opt_verbosity_cb>, defval = 0}, {type = OPTION_STRING, short_name = 0, long_name = \n0x4f75fc \"repo\", value = 0x7fffffffd738, argh = 0x4f633d \"repository\", \n            help = 0x4f633d \"repository\", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_BIT, short_name = 0, long_name = \n0x4fcac6 \"all\", value = 0x7fffffffd730, argh = 0x0, help = 0x5083a3 \"push all refs\", \n            flags = 2, callback = 0x0, defval = 1}, {type = OPTION_BIT, short_name = 0, long_name = 0x50cada \"mirror\", value = \n0x7fffffffd730, argh = 0x0, help = 0x5083b1 \"mirror all refs\", flags = 2, callback = 0x0, \n            defval = 10}, {type = OPTION_COUNTUP, short_name = 0, long_name = 0x509491 \"delete\", value = 0x7673a4 <deleterefs>, \nargh = 0x0, help = 0x5083c1 \"delete refs\", flags = 2, callback = 0x0, defval = 0}, {\n            type = OPTION_COUNTUP, short_name = 0, long_name = 0x50de98 \"tags\", value = 0x7fffffffd734, argh = 0x0, help = \n0x508488 \"push tags (can't be used with --all or --mirror)\", flags = 2, callback = 0x0, defval = 0}, \n          {type = OPTION_BIT, short_name = 110, long_name = 0x4ff33b \"dry-run\", value = 0x7fffffffd730, argh = 0x0, help = 0x4f59ff \n\"dry run\", flags = 2, callback = 0x0, defval = 4}, {type = OPTION_BIT, short_name = 0, \n            long_name = 0x51d610 \"porcelain\", value = 0x7fffffffd730, argh = 0x0, help = 0x4fb848 \"machine-readable output\", flags = \n2, callback = 0x0, defval = 16}, {type = OPTION_BIT, short_name = 102, \n            long_name = 0x4ff35e \"force\", value = 0x7fffffffd730, argh = 0x0, help = 0x5083cd \"force updates\", flags = 2, callback = \n0x0, defval = 2}, {type = OPTION_CALLBACK, short_name = 0, \n            long_name = 0x4ff366 \"recurse-submodules\", value = 0x7fffffffd730, argh = 0x50c7b7 \"check\", help = 0x5084c0 \"controls \nrecursive pushing of submodules\", flags = 1, \n            callback = 0x451510 <option_parse_recurse_submodules>, defval = 0}, {type = OPTION_COUNTUP, short_name = 0, \nlong_name = 0x4fefd4 \"thin\", value = 0x7673a8 <thin>, argh = 0x0, help = 0x5083db \"use thin pack\", \n            flags = 2, callback = 0x0, defval = 0}, {type = OPTION_STRING, short_name = 0, long_name = 0x50ca97 \"receive-pack\", value \n= 0x7673b0 <receivepack>, argh = 0x50ca97 \"receive-pack\", \n            help = 0x5083e9 \"receive pack program\", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_STRING, short_name = 0, \nlong_name = 0x4f7601 \"exec\", value = 0x7673b0 <receivepack>, argh = 0x50ca97 \"receive-pack\", \n            help = 0x5083e9 \"receive pack program\", flags = 0, callback = 0x0, defval = 0}, {type = OPTION_BIT, short_name = 117, \nlong_name = 0x4f879d \"set-upstream\", value = 0x7fffffffd730, argh = 0x0, \n            help = 0x5084f0 \"set upstream for git pull/status\", flags = 2, callback = 0x0, defval = 32}, {type = OPTION_SET_INT, \nshort_name = 0, long_name = 0x500799 \"progress\", value = 0x7489b4 <progress>, argh = 0x0, \n            help = 0x4fab20 \"force progress reporting\", flags = 2, callback = 0x0, defval = 1}, {type = OPTION_BIT, short_name = 0, \nlong_name = 0x50a386 \"prune\", value = 0x7fffffffd730, argh = 0x0, \n            help = 0x5083fe \"prune locally removed refs\", flags = 2, callback = 0x0, defval = 128}, {type = OPTION_END, short_name = 0, \nlong_name = 0x0, value = 0x0, argh = 0x0, help = 0x0, flags = 0, callback = 0x0, \n---Type <return> to continue, or q <return> to quit---\n            defval = 0}}\n#6  0x0000000000405788 in run_builtin (argv=0x7fffffffde50, argc=3, p=0x744dc8 <commands.11293+1704>) at git.c:308\n        status = <optimized out>\n        help = <optimized out>\n        st = {st_dev = 140737341403408, st_ino = 140737488346288, st_nlink = 0, st_mode = 4214692, st_uid = 0, st_gid = \n4294958656, __pad0 = 32767, st_rdev = 4294967296, st_size = 0, st_blksize = 140737488346968, \n          st_blocks = 7979280, st_atim = {tv_sec = 140737488346288, tv_nsec = 0}, st_mtim = {tv_sec = 4214692, tv_nsec = \n140737488346688}, st_ctim = {tv_sec = 140737488347654, tv_nsec = 0}, __unused = {5056825, \n            140737488350098, 4790338}}\n        prefix = <optimized out>\n#7  handle_internal_command (argc=3, argv=0x7fffffffde50) at git.c:467\n        p = 0x744dc8 <commands.11293+1704>\n        cmd = <optimized out>\n        commands = {{cmd = 0x50a441 \"add\", fn = 0x405e70 <cmd_add>, option = 9}, {cmd = 0x4f51e5 \"annotate\", fn = 0x406990 \n<cmd_annotate>, option = 1}, {cmd = 0x4f5a57 \"apply\", fn = 0x40da30 <cmd_apply>, option = 2}, {\n            cmd = 0x4f7566 \"archive\", fn = 0x40e800 <cmd_archive>, option = 0}, {cmd = 0x4f51ee \"bisect--helper\", fn = 0x40ea10 \n<cmd_bisect__helper>, option = 1}, {cmd = 0x4f51fd \"blame\", fn = 0x410920 <cmd_blame>, \n            option = 1}, {cmd = 0x50a618 \"branch\", fn = 0x413cc0 <cmd_branch>, option = 1}, {cmd = 0x4faa45 \"bundle\", fn = \n0x415250 <cmd_bundle>, option = 2}, {cmd = 0x4f5203 \"cat-file\", fn = 0x415550 <cmd_cat_file>, \n            option = 1}, {cmd = 0x4f520c \"check-attr\", fn = 0x415fc0 <cmd_check_attr>, option = 1}, {cmd = 0x4f5217 \"check-ref-\nformat\", fn = 0x416380 <cmd_check_ref_format>, option = 0}, {cmd = 0x4fab48 \"checkout\", \n            fn = 0x417a00 <cmd_checkout>, option = 9}, {cmd = 0x4f5228 \"checkout-index\", fn = 0x416a80 <cmd_checkout_index>, \noption = 9}, {cmd = 0x51adf8 \"cherry\", fn = 0x43abb0 <cmd_cherry>, option = 1}, {\n            cmd = 0x51ae17 \"cherry-pick\", fn = 0x45eda0 <cmd_cherry_pick>, option = 9}, {cmd = 0x4f5237 \"clean\", fn = 0x41a070 \n<cmd_clean>, option = 9}, {cmd = 0x4f523d \"clone\", fn = 0x41b030 <cmd_clone>, option = 0}, {\n            cmd = 0x4fb693 \"commit\", fn = 0x41ee70 <cmd_commit>, option = 9}, {cmd = 0x4f5243 \"commit-tree\", fn = 0x41c550 \n<cmd_commit_tree>, option = 1}, {cmd = 0x4f542f \"config\", fn = 0x420e20 <cmd_config>, option = 2}, {\n            cmd = 0x4f524f \"count-objects\", fn = 0x4215f0 <cmd_count_objects>, option = 1}, {cmd = 0x4f525d \"describe\", fn = \n0x4227c0 <cmd_describe>, option = 1}, {cmd = 0x51328b \"diff\", fn = 0x423870 <cmd_diff>, \n            option = 0}, {cmd = 0x4f5266 \"diff-files\", fn = 0x422de0 <cmd_diff_files>, option = 9}, {cmd = 0x4f5271 \"diff-index\", fn = \n0x423020 <cmd_diff_index>, option = 1}, {cmd = 0x4f527c \"diff-tree\", \n            fn = 0x4231b0 <cmd_diff_tree>, option = 1}, {cmd = 0x51e3ea \"fast-export\", fn = 0x424cb0 <cmd_fast_export>, option = \n1}, {cmd = 0x4faaac \"fetch\", fn = 0x42a0a0 <cmd_fetch>, option = 1}, {\n            cmd = 0x4f5286 \"fetch-pack\", fn = 0x4277c0 <cmd_fetch_pack>, option = 1}, {cmd = 0x4f5291 \"fmt-merge-msg\", fn = \n0x42b920 <cmd_fmt_merge_msg>, option = 1}, {cmd = 0x4f529f \"for-each-ref\", \n            fn = 0x42d5e0 <cmd_for_each_ref>, option = 1}, {cmd = 0x4f52ac \"format-patch\", fn = 0x439170 <cmd_format_patch>, \noption = 1}, {cmd = 0x51480e \"fsck\", fn = 0x42e820 <cmd_fsck>, option = 1}, {\n            cmd = 0x4f52b9 \"fsck-objects\", fn = 0x42e820 <cmd_fsck>, option = 1}, {cmd = 0x500a98 \"gc\", fn = 0x42f480 <cmd_gc>, \noption = 1}, {cmd = 0x4f52c6 \"get-tar-commit-id\", fn = 0x465970 <cmd_get_tar_commit_id>, \n            option = 0}, {cmd = 0x500f09 \"grep\", fn = 0x430700 <cmd_grep>, option = 2}, {cmd = 0x4f52d8 \"hash-object\", fn = \n0x432400 <cmd_hash_object>, option = 0}, {cmd = 0x4f4fc6 \"help\", fn = 0x4330b0 <cmd_help>, \n            option = 0}, {cmd = 0x4f52e4 \"index-pack\", fn = 0x434880 <cmd_index_pack>, option = 2}, {cmd = 0x4fac0c \"init\", fn = \n0x436fe0 <cmd_init_db>, option = 0}, {cmd = 0x4f52ef \"init-db\", fn = 0x436fe0 <cmd_init_db>, \n            option = 0}, {cmd = 0x519de7 \"log\", fn = 0x439090 <cmd_log>, option = 1}, {cmd = 0x4f52f7 \"ls-files\", fn = 0x43b6d0 \n<cmd_ls_files>, option = 1}, {cmd = 0x4f5300 \"ls-remote\", fn = 0x43c890 <cmd_ls_remote>, \n            option = 2}, {cmd = 0x4f530a \"ls-tree\", fn = 0x43d080 <cmd_ls_tree>, option = 1}, {cmd = 0x4f5312 \"mailinfo\", fn = \n0x43e9b0 <cmd_mailinfo>, option = 0}, {cmd = 0x4f531b \"mailsplit\", \n            fn = 0x43fce0 <cmd_mailsplit>, option = 0}, {cmd = 0x50551f \"merge\", fn = 0x441da0 <cmd_merge>, option = 9}, {cmd = \n0x4f5325 \"merge-base\", fn = 0x443b90 <cmd_merge_base>, option = 1}, {\n            cmd = 0x4f5330 \"merge-file\", fn = 0x443ed0 <cmd_merge_file>, option = 2}, {cmd = 0x4f533b \"merge-index\", fn = \n0x444610 <cmd_merge_index>, option = 1}, {cmd = 0x4f5347 \"merge-ours\", \n            fn = 0x444820 <cmd_merge_ours>, option = 1}, {cmd = 0x4f5352 \"merge-recursive\", fn = 0x4448b0 \n<cmd_merge_recursive>, option = 9}, {cmd = 0x4f5362 \"merge-recursive-ours\", fn = 0x4448b0 <cmd_merge_recursive>, \n            option = 9}, {cmd = 0x4f5377 \"merge-recursive-theirs\", fn = 0x4448b0 <cmd_merge_recursive>, option = 9}, {cmd = \n0x4f538e \"merge-subtree\", fn = 0x4448b0 <cmd_merge_recursive>, option = 9}, {\n            cmd = 0x4f539c \"merge-tree\", fn = 0x4450a0 <cmd_merge_tree>, option = 1}, {cmd = 0x4f53a7 \"mktag\", fn = 0x445410 \n<cmd_mktag>, option = 1}, {cmd = 0x4f53ad \"mktree\", fn = 0x4459a0 <cmd_mktree>, option = 1}, {\n            cmd = 0x4f53b4 \"mv\", fn = 0x446110 <cmd_mv>, option = 9}, {cmd = 0x4f53b7 \"name-rev\", fn = 0x447010 \n<cmd_name_rev>, option = 1}, {cmd = 0x506456 \"notes\", fn = 0x4488e0 <cmd_notes>, option = 1}, {\n            cmd = 0x510a0f \"pack-objects\", fn = 0x44cb90 <cmd_pack_objects>, option = 1}, {cmd = 0x4f53c0 \"pack-redundant\", fn = \n0x44f430 <cmd_pack_redundant>, option = 1}, {cmd = 0x4f53cf \"pack-refs\", \n            fn = 0x450460 <cmd_pack_refs>, option = 1}, {cmd = 0x4f53d9 \"patch-id\", fn = 0x450530 <cmd_patch_id>, option = 0}, \n{cmd = 0x4f53e2 \"peek-remote\", fn = 0x43c890 <cmd_ls_remote>, option = 2}, {\n            cmd = 0x4f53ee \"pickaxe\", fn = 0x410920 <cmd_blame>, option = 1}, {cmd = 0x50a386 \"prune\", fn = 0x450ec0 \n<cmd_prune>, option = 1}, {cmd = 0x4f53f6 \"prune-packed\", fn = 0x450ca0 <cmd_prune_packed>, option = 1}, {\n            cmd = 0x51ddc8 \"push\", fn = 0x451730 <cmd_push>, option = 1}, {cmd = 0x4f5403 \"read-tree\", fn = 0x452350 \n<cmd_read_tree>, option = 1}, {cmd = 0x50ca97 \"receive-pack\", fn = 0x453960 <cmd_receive_pack>, \n            option = 0}, {cmd = 0x4f884c \"reflog\", fn = 0x4562b0 <cmd_reflog>, option = 1}, {cmd = 0x50a234 \"remote\", fn = 0x4577e0 \n<cmd_remote>, option = 1}, {cmd = 0x4f540d \"remote-ext\", fn = 0x45a740 <cmd_remote_ext>, \n            option = 0}, {cmd = 0x4f5418 \"remote-fd\", fn = 0x45a8e0 <cmd_remote_fd>, option = 0}, {cmd = 0x4f5422 \"replace\", fn = \n0x45acb0 <cmd_replace>, option = 1}, {cmd = 0x4f542a \"repo-config\", \n            fn = 0x421590 <cmd_repo_config>, option = 2}, {cmd = 0x4f5436 \"rerere\", fn = 0x45af10 <cmd_rerere>, option = 1}, {cmd \n= 0x50433e \"reset\", fn = 0x45b890 <cmd_reset>, option = 1}, {cmd = 0x4f543d \"rev-list\", \n            fn = 0x45c6e0 <cmd_rev_list>, option = 1}, {cmd = 0x4f5446 \"rev-parse\", fn = 0x45d020 <cmd_rev_parse>, option = 0}, \n{cmd = 0x4f5450 \"revert\", fn = 0x45ed10 <cmd_revert>, option = 9}, {cmd = 0x4f5457 \"rm\", \n            fn = 0x45ee20 <cmd_rm>, option = 1}, {cmd = 0x4f545a \"send-pack\", fn = 0x460100 <cmd_send_pack>, option = 1}, {cmd = \n0x4f5464 \"shortlog\", fn = 0x461440 <cmd_shortlog>, option = 6}, {cmd = 0x4f546d \"show\", \n            fn = 0x438be0 <cmd_show>, option = 1}, {cmd = 0x4f5472 \"show-branch\", fn = 0x4620d0 <cmd_show_branch>, option = 1}, \n{cmd = 0x4f547e \"show-ref\", fn = 0x463af0 <cmd_show_ref>, option = 1}, {cmd = 0x4f5487 \"stage\", \n            fn = 0x405e70 <cmd_add>, option = 9}, {cmd = 0x50c9c4 \"status\", fn = 0x41ec40 <cmd_status>, option = 9}, {cmd = \n0x4f548d \"stripspace\", fn = 0x463e90 <cmd_stripspace>, option = 0}, {cmd = 0x4f5498 \"symbolic-ref\", \n            fn = 0x463f50 <cmd_symbolic_ref>, option = 1}, {cmd = 0x51d96d \"tag\", fn = 0x464920 <cmd_tag>, option = 1}, {cmd = \n0x4f54a5 \"tar-tree\", fn = 0x4657e0 <cmd_tar_tree>, option = 0}, {cmd = 0x4f54ae \"unpack-file\", \n            fn = 0x465a50 <cmd_unpack_file>, option = 1}, {cmd = 0x4f54ba \"unpack-objects\", fn = 0x466440 <cmd_unpack_objects>, \noption = 1}, {cmd = 0x4f54c9 \"update-index\", fn = 0x468400 <cmd_update_index>, option = 1}, {\n            cmd = 0x4f54d6 \"update-ref\", fn = 0x468f00 <cmd_update_ref>, option = 1}, {cmd = 0x4f54e1 \"update-server-info\", fn = \n0x469190 <cmd_update_server_info>, option = 1}, {cmd = 0x4f755f \"upload-archive\", \n            fn = 0x469490 <cmd_upload_archive>, option = 0}, {cmd = 0x4f54f4 \"upload-archive--writer\", fn = 0x4692d0 \n<cmd_upload_archive_writer>, option = 0}, {cmd = 0x4f550b \"var\", fn = 0x4696b0 <cmd_var>, option = 2}, {\n            cmd = 0x4f550f \"verify-pack\", fn = 0x4697b0 <cmd_verify_pack>, option = 0}, {cmd = 0x4f551b \"verify-tag\", fn = 0x469b60 \n<cmd_verify_tag>, option = 1}, {cmd = 0x5167b6 \"version\", fn = 0x497a30 <cmd_version>, \n            option = 0}, {cmd = 0x4f5526 \"whatchanged\", fn = 0x438ae0 <cmd_whatchanged>, option = 1}, {cmd = 0x50f5d5 \"write-\ntree\", fn = 0x469dc0 <cmd_write_tree>, option = 1}}\n---Type <return> to continue, or q <return> to quit---\n        i = <optimized out>\n#8  0x0000000000404b92 in run_argv (argv=0x7fffffffdce0, argcp=0x7fffffffdcec) at git.c:513\n        done_alias = 0\n#9  main (argc=3, argv=0x7fffffffde50) at git.c:588\n        done_help = 0\n        was_alias = 0\n        cmd = 0x7fffffffe206 \"push\"\n(gdb) quit\n\n\n-- \nPali Rohár\npali.rohar@gmail.com\n"},{"id":"214091","messageId":"20130412190630.GM2222@serenity.lan","threadId":"33493","inReplyTo":"201304122050.26471@pali","subject":"Re: Bug: git push crashing","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-04-12T19:06:31Z","receivedAt":"2013-04-12T19:06:31Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Fri, Apr 12, 2013 at 08:50:25PM +0200, Pali Rohár wrote:\n> when I'm trying to push one specific branch from my git repository\n> to server, git push crashing. Pushing branch is rejected by server\n> (because non fast forward), but local git app should not crash.\n> \n> I'm using git from ubuntu apt repository (compiled myself for debug\n> symbols), version git_1.7.10.4-1ubuntu1 on amd64 ubuntu system:\n> http://packages.ubuntu.com/source/quantal/git\n> \n> Here are gdb backtrace and valgrind outputs. I changed server, repo\n> and branch strings from output. It looks like that git crashing in\n> strcmp function because one of arguments is NULL.\n> \n> If you need more info, I can send it. This crash occur always. I can\n> reproduce it again and again...\n\nThis looks like the same issue that was fixed by commit 1d2c14d (push:\nfix segfault when HEAD points nowhere - 2013-01-31).\n\nCan you try again with Git 1.8.2 and see if the crash still happens?\n"},{"id":"214094","messageId":"201304122132.59464@pali","threadId":"33493","inReplyTo":"20130412190630.GM2222@serenity.lan","subject":"Re: Bug: git push crashing","fromName":"Pali Rohár","fromEmail":"pali.rohar@gmail.com","sentAt":"2013-04-12T19:32:59Z","receivedAt":"2013-04-12T19:32:59Z","isPatch":false,"sender":{"key":"pali.rohar@gmail.com","avatar":null},"body":"On Friday 12 April 2013 21:06:31 John Keeping wrote:\n> On Fri, Apr 12, 2013 at 08:50:25PM +0200, Pali Rohár wrote:\n> > when I'm trying to push one specific branch from my git\n> > repository to server, git push crashing. Pushing branch is\n> > rejected by server (because non fast forward), but local\n> > git app should not crash.\n> > \n> > I'm using git from ubuntu apt repository (compiled myself\n> > for debug symbols), version git_1.7.10.4-1ubuntu1 on amd64\n> > ubuntu system:\n> > http://packages.ubuntu.com/source/quantal/git\n> > \n> > Here are gdb backtrace and valgrind outputs. I changed\n> > server, repo and branch strings from output. It looks like\n> > that git crashing in strcmp function because one of\n> > arguments is NULL.\n> > \n> > If you need more info, I can send it. This crash occur\n> > always. I can reproduce it again and again...\n> \n> This looks like the same issue that was fixed by commit\n> 1d2c14d (push: fix segfault when HEAD points nowhere -\n> 2013-01-31).\n> \n> Can you try again with Git 1.8.2 and see if the crash still\n> happens?\n\nHello, now I tried version 1.8.2.1 and git push not crashing :-) \nI also tried version 1.8.1 and as expected it crashed.\n\nSo thanks for quick reply, seems that this problem is already \nfixed in 1.8.2.\n\n-- \nPali Rohár\npali.rohar@gmail.com\n"}]}