{"thread":{"id":"38531","subject":"git 2.2.2 annotate crash (strbuf.c:32)","startedAt":"2015-02-08T21:33:40Z","lastAt":"2015-02-09T20:50:35Z","messageCount":7,"participants":["Dilyan Palauzov","Jeff King","Eric Sunshine","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"255787","messageId":"54D7D634.2050807@aegee.org","threadId":"38531","inReplyTo":null,"subject":"git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Dilyan Palauzov","fromEmail":"dilyan.palauzov@aegee.org","sentAt":"2015-02-08T21:33:40Z","receivedAt":"2015-02-08T21:33:40Z","isPatch":false,"sender":{"key":"dilyan.palauzov@aegee.org","avatar":null},"body":"Hello,\n\nI use git 2.2.2 and on my system git annotate crashed with the following \nlog.\n\nKind regards\n   Dilyan\n\n(gdb) bt full\n#0  0x00007fe420649655 in raise () from /lib64/libc.so.6\nNo symbol table info available.\n#1  0x00007fe42064aad8 in abort () from /lib64/libc.so.6\nNo symbol table info available.\n#2  0x00007fe42068928b in __libc_message () from /lib64/libc.so.6\nNo symbol table info available.\n#3  0x00007fe42068ee36 in malloc_printerr () from /lib64/libc.so.6\nNo symbol table info available.\n#4  0x00007fe42068fbb3 in _int_free () from /lib64/libc.so.6\nNo symbol table info available.\n#5  0x000000000041335a in strbuf_release (sb=0x7fff44797480) at strbuf.c:32\n         sb = 0x7fff44797480\n#6  commit_info_destroy (ci=0x7fff447973e0) at builtin/blame.c:1646\nNo locals.\n#7  find_alignment (option=0x7e8220 <output_option>, sb=0x7fff447972f0) \nat builtin/blame.c:2117\n         suspect = 0xd71230\n         ci = {\n           author = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           author_mail = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           author_time = 959115099,\n           author_tz = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           committer = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           committer_mail = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           committer_time = 959115099,\n           committer_tz = {\n             alloc = 0,\n             len = 0,\n             buf = 0x810540 <strbuf_slopbuf> \"\"\n           },\n           summary = {\n             alloc = 26,\n             len = 25,\n             buf = 0xe05b50 <incomplete sequence \\330>\n           }\n         }\n         num = <optimized out>\n         longest_src_lines = 13\n         largest_score = 175\n         e = 0xd45c80\n         longest_dst_lines = 12\n         compute_auto_abbrev = 1\n         auto_abbrev = 7\n#8  cmd_blame (argc=<optimized out>, argv=<optimized out>, \nprefix=prefix@entry=0x0) at builtin/blame.c:2797\n         revs = {\n           commits = 0xd222a0,\n           pending = {\n             nr = 0,\n             alloc = 0,\n             objects = 0x0\n           },\n           boundary_commits = {\n             nr = 0,\n             alloc = 0,\n             objects = 0x0\n           },\n           cmdline = {\n             nr = 0,\n             alloc = 0,\n             rev = 0x0\n           },\n           ref_excludes = 0x0,\n           prefix = 0x0,\n           def = 0x0,\n           prune_data = {\n             _raw = 0x0,\n             nr = 0,\n             has_wildcard = 0,\n             recursive = 0,\n             magic = 0,\n             max_depth = 0,\n             items = 0x0\n           },\n           sort_order = REV_SORT_IN_GRAPH_ORDER,\n           early_output = 0,\n           ignore_missing = 0,\n           ignore_missing_links = 0,\n           dense = 1,\n           prune = 0,\n           no_walk = 0,\n           show_all = 0,\n           remove_empty_trees = 0,\n           simplify_history = 1,\n           topo_order = 0,\n           simplify_merges = 0,\n           simplify_by_decoration = 0,\n           tag_objects = 0,\n           tree_objects = 0,\n           blob_objects = 0,\n           verify_objects = 0,\n           edge_hint = 0,\n           limited = 0,\n           unpacked = 0,\n           boundary = 0,\n           count = 0,\n           left_right = 0,\n           left_only = 0,\n           right_only = 0,\n           rewrite_parents = 0,\n           print_parents = 0,\n           show_source = 0,\n           show_decorations = 0,\n           reverse = 0,\n           reverse_output_stage = 0,\n           cherry_pick = 0,\n           cherry_mark = 0,\n           bisect = 0,\n           ancestry_path = 0,\n           first_parent_only = 0,\n           line_level_traverse = 0,\n           diff = 0,\n           full_diff = 0,\n           show_root_diff = 0,\n           no_commit_id = 0,\n           verbose_header = 0,\n           ignore_merges = 1,\n           combine_merges = 0,\n           dense_combined_merges = 0,\n           always_show_header = 0,\n           shown_one = 0,\n           shown_dashes = 0,\n           show_merge = 0,\n           show_notes = 0,\n           show_notes_given = 0,\n           show_signature = 0,\n           pretty_given = 0,\n           abbrev_commit = 0,\n           abbrev_commit_given = 0,\n           use_terminator = 0,\n           missing_newline = 0,\n           date_mode_explicit = 0,\n           preserve_subject = 0,\n           disable_stdin = 1,\n           leak_pending = 0,\n           track_linear = 0,\n           track_first_time = 0,\n           linear = 0,\n           date_mode = DATE_ISO8601,\n           abbrev = 7,\n           commit_format = CMIT_FMT_MEDIUM,\n           loginfo = 0x0,\n           nr = 0,\n           total = 0,\n           mime_boundary = 0x0,\n           patch_suffix = 0x0,\n           numbered_files = 0,\n           reroll_count = 0,\n           message_id = 0x0,\n           from_ident = {\n             name_begin = 0x0,\n             name_end = 0x0,\n             mail_begin = 0x0,\n             mail_end = 0x0,\n             date_begin = 0x0,\n             date_end = 0x0,\n             tz_begin = 0x0,\n             tz_end = 0x0\n           },\n           ref_message_ids = 0x0,\n           add_signoff = 0,\n           extra_headers = 0x0,\n           log_reencode = 0x0,\n           subject_prefix = 0x0,\n           no_inline = 0,\n           show_log_size = 0,\n           mailmap = 0x0,\n           grep_filter = {\n             pattern_list = 0x0,\n             pattern_tail = 0x7fff44797918,\n             header_list = 0x0,\n             header_tail = 0x7fff44797928,\n             pattern_expression = 0x0,\n             prefix = 0x0,\n             prefix_length = 0,\n             regexp = {\n               buffer = 0x0,\n               allocated = 0,\n               used = 0,\n               syntax = 0,\n               fastmap = 0x0,\n               translate = 0x0,\n               re_nsub = 0,\n               can_be_null = 0,\n               regs_allocated = 0,\n               fastmap_accurate = 0,\n               no_sub = 0,\n               not_bol = 0,\n               not_eol = 0,\n               newline_anchor = 0\n             },\n             linenum = 0,\n             invert = 0,\n             ignore_case = 0,\n             status_only = 1,\n             name_only = 0,\n             unmatch_name_only = 0,\n             count = 0,\n             word_regexp = 0,\n             fixed = 0,\n             all_match = 0,\n             debug = 0,\n             binary = 0,\n             allow_textconv = 0,\n             extended = 0,\n             use_reflog_filter = 0,\n             pcre = 0,\n             relative = 1,\n             pathname = 1,\n             null_following_name = 0,\n             color = -1,\n             max_depth = -1,\n             funcname = 0,\n             funcbody = 0,\n             extended_regexp_option = 0,\n             pattern_type_option = 0,\n             color_context = '\\000' <repeats 39 times>,\n             color_filename = '\\000' <repeats 39 times>,\n             color_function = '\\000' <repeats 39 times>,\n             color_lineno = '\\000' <repeats 39 times>,\n             color_match_context = \"\\033[1;31m\", '\\000' <repeats 32 times>,\n             color_match_selected = \"\\033[1;31m\", '\\000' <repeats 32 \ntimes>,\n             color_selected = '\\000' <repeats 39 times>,\n             color_sep = \"\\033[36m\", '\\000' <repeats 34 times>,\n             regflags = 4,\n             pre_context = 0,\n             post_context = 0,\n             last_shown = 0,\n             show_hunk_mark = 0,\n             file_break = 0,\n             heading = 0,\n             priv = 0x0,\n             output = 0x0,\n             output_priv = 0x0\n           },\n           graph = 0x0,\n           skip_count = -1,\n           max_count = -1,\n           max_age = 18446744073709551615,\n           min_age = 18446744073709551615,\n           min_parents = 0,\n           max_parents = -1,\n           include_check = 0x0,\n           include_check_data = 0x0,\n           diffopt = {\n             orderfile = 0x0,\n             pickaxe = 0x0,\n             single_follow = 0x0,\n             a_prefix = 0x5a0f0e \"a/\",\n             b_prefix = 0x5a0f11 \"b/\",\n             flags = 2097408,\n             touched_flags = 6291840,\n             filter = 0,\n             use_color = -1,\n             context = 3,\n             interhunkcontext = 0,\n             break_opt = -1,\n             detect_rename = 0,\n             irreversible_delete = 0,\n             skip_stat_unmatch = 0,\n             line_termination = 10,\n             output_format = 0,\n             pickaxe_opts = 0,\n             rename_score = 0,\n             rename_limit = -1,\n             needed_rename_limit = 0,\n             degraded_cc_to_c = 0,\n             show_rename_progress = 0,\n             dirstat_permille = 30,\n             setup = 0,\n             abbrev = 7,\n             prefix = 0x0,\n             prefix_length = 0,\n             stat_sep = 0x0,\n             xdl_opts = 0,\n             stat_width = 0,\n             stat_name_width = 0,\n             stat_graph_width = 0,\n             stat_count = 0,\n             word_regex = 0x0,\n             word_diff = DIFF_WORDS_NONE,\n             found_changes = 0,\n             found_follow = 0,\n             set_default = 0x0,\n             file = 0x7fe4209be160 <_IO_2_1_stdout_>,\n             close_file = 0,\n             pathspec = {\n               _raw = 0x0,\n               nr = 0,\n               has_wildcard = 0,\n               recursive = 0,\n               magic = 0,\n               max_depth = 0,\n               items = 0x0\n             },\n             pathchange = 0x0,\n             change = 0x4ab165 <diff_change>,\n             add_remove = 0x4aaced <diff_addremove>,\n             format_callback = 0x0,\n             format_callback_data = 0x0,\n             output_prefix = 0x0,\n             output_prefix_length = 0,\n             output_prefix_data = 0x0,\n             diff_path_counter = 0\n           },\n           pruning = {\n             orderfile = 0x0,\n             pickaxe = 0x0,\n             single_follow = 0x0,\n             a_prefix = 0x0,\n             b_prefix = 0x0,\n             flags = 2049,\n             touched_flags = 2049,\n             filter = 0,\n             use_color = 0,\n             context = 0,\n             interhunkcontext = 0,\n             break_opt = 0,\n             detect_rename = 0,\n             irreversible_delete = 0,\n             skip_stat_unmatch = 0,\n             line_termination = 0,\n             output_format = 0,\n             pickaxe_opts = 0,\n             rename_score = 0,\n             rename_limit = 0,\n             needed_rename_limit = 0,\n             degraded_cc_to_c = 0,\n             show_rename_progress = 0,\n             dirstat_permille = 0,\n             setup = 0,\n             abbrev = 0,\n             prefix = 0x0,\n             prefix_length = 0,\n             stat_sep = 0x0,\n             xdl_opts = 0,\n             stat_width = 0,\n             stat_name_width = 0,\n             stat_graph_width = 0,\n             stat_count = 0,\n             word_regex = 0x0,\n             word_diff = DIFF_WORDS_NONE,\n             found_changes = 0,\n             found_follow = 0,\n             set_default = 0x0,\n             file = 0x0,\n             close_file = 0,\n             pathspec = {\n               _raw = 0x0,\n               nr = 0,\n               has_wildcard = 0,\n               recursive = 0,\n               magic = 0,\n               max_depth = 0,\n               items = 0x0\n             },\n             pathchange = 0x0,\n             change = 0x55b66c <file_change.lto_priv.974>,\n             add_remove = 0x55b640 <file_add_remove.lto_priv.973>,\n             format_callback = 0x0,\n             format_callback_data = 0x0,\n             output_prefix = 0x0,\n             output_prefix_length = 0,\n             output_prefix_data = 0x0,\n             diff_path_counter = 0\n           },\n           reflog_info = 0x0,\n           children = {\n             name = 0x0,\n             size = 0,\n             nr = 0,\n             hash = 0x0\n           },\n           merge_simplification = {\n             name = 0x0,\n             size = 0,\n             nr = 0,\n             hash = 0x0\n           },\n           treesame = {\n             name = 0x0,\n             size = 0,\n             nr = 0,\n             hash = 0x0\n           },\n           notes_opt = {\n             use_default_notes = -1,\n             extra_notes_refs = {\n               items = 0x0,\n               nr = 0,\n               alloc = 0,\n               strdup_strings = 0,\n               cmp = 0x0\n             }\n           },\n           count_left = 0,\n           count_right = 0,\n           count_same = 0,\n           line_log_data = {\n             name = 0x0,\n             size = 0,\n             nr = 0,\n             hash = 0x0\n           },\n           saved_parents_slab = 0x0,\n           previous_parents = 0x0,\n           break_bar = 0x0\n         }\n         path = <optimized out>\n         sb = {\n           final = 0xcdb260,\n           commits = {\n             compare = 0x4843a9 <compare_commits_by_commit_date>,\n             insertion_ctr = 4891,\n             cb_data = 0x0,\n             alloc = 24,\n             nr = 0,\n             array = 0xd2bc90\n           },\n           revs = 0x7fff447977e0,\n           path = 0xcd7910 \"timsieved/parser.c\",\n           final_buf = 0xd24a30 \"/* parser.c -- parser used by \ntimsieved\\n * Tim Martin\\n * 9/21/99\\n *\\n * Copyright (c) 1994-2008 \nCarnegie Mellon University.  All rights reserved.\\n *\\n * Redistribution \nand use in source and binary forms\"...,\n           final_buf_size = 24507,\n           ent = 0xd222c0,\n           num_lines = 984,\n           lineno = 0xd2aa00\n         }\n         o = <optimized out>\n         ent = <optimized out>\n         dashdash_pos = <optimized out>\n         lno = <optimized out>\n         final_commit_name = <optimized out>\n         type = OBJ_NONE\n         range_list = {\n           items = 0x0,\n           nr = 0,\n           alloc = 0,\n           strdup_strings = 0,\n           cmp = 0x0\n         }\n         output_option = 1\n         opt = 0\n         show_stats = 0\n         revs_file = 0x0\n         contents_from = 0x0\n         options = {{\n             type = OPTION_SET_INT,\n             short_name = 0,\n             long_name = 0x597660 \"incremental\",\n             value = 0x7e81bc <incremental>,\n             argh = 0x0,\n             help = 0x583a10 \"Show blame entries as we find them, \nincrementally\",\n             flags = 2,\n             callback = 0x0,\n             defval = 1\n           }, {\n             type = OPTION_SET_INT,\n             short_name = 98,\n             long_name = 0x0,\n             value = 0x7e81ac <blank_boundary>,\n             argh = 0x0,\n             help = 0x583a48 \"Show blank SHA-1 for boundary commits \n(Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 1\n           }, {\n             type = OPTION_SET_INT,\n             short_name = 0,\n             long_name = 0x5ab91d \"root\",\n             value = 0x7e8194 <show_root>,\n             argh = 0x0,\n             help = 0x583a80 \"Do not treat root commits as boundaries \n(Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 1\n           }, {\n             type = OPTION_SET_INT,\n             short_name = 0,\n             long_name = 0x584f1e \"show-stats\",\n             value = 0x7e81b0 <show_stats>,\n             argh = 0x0,\n             help = 0x584f29 \"Show work cost statistics\",\n             flags = 2,\n             callback = 0x0,\n             defval = 1\n           }, {\n             type = OPTION_BIT,\n             short_name = 0,\n             long_name = 0x584f43 \"score-debug\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583ab8 \"Show output score for blame entries\",\n             flags = 2,\n             callback = 0x0,\n             defval = 64\n           }, {\n             type = OPTION_BIT,\n             short_name = 102,\n             long_name = 0x584f4f \"show-name\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583ae0 \"Show original filename (Default: auto)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 16\n           }, {\n             type = OPTION_BIT,\n             short_name = 110,\n             long_name = 0x584f59 \"show-number\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583b08 \"Show original linenumber (Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 32\n           }, {\n             type = OPTION_BIT,\n             short_name = 112,\n             long_name = 0x5a0c9f \"porcelain\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583b30 \"Show in a format designed for machine \nconsumption\",\n             flags = 2,\n             callback = 0x0,\n             defval = 8\n           }, {\n             type = OPTION_BIT,\n             short_name = 0,\n             long_name = 0x584f65 \"line-porcelain\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583b68 \"Show porcelain format with per-line commit \ninformation\",\n             flags = 2,\n             callback = 0x0,\n             defval = 520\n           }, {\n             type = OPTION_BIT,\n             short_name = 99,\n             long_name = 0x0,\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583ba0 \"Use the same output mode as git-annotate \n(Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 1\n           }, {\n             type = OPTION_BIT,\n             short_name = 116,\n             long_name = 0x0,\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583bd8 \"Show raw timestamp (Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 4\n           }, {\n             type = OPTION_BIT,\n             short_name = 108,\n             long_name = 0x0,\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583c00 \"Show long commit SHA1 (Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 2\n           }, {\n             type = OPTION_BIT,\n             short_name = 115,\n             long_name = 0x0,\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583c28 \"Suppress author name and timestamp \n(Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 128\n           }, {\n             type = OPTION_BIT,\n             short_name = 101,\n             long_name = 0x584f74 \"show-email\",\n             value = 0x7e8220 <output_option>,\n             argh = 0x0,\n             help = 0x583c60 \"Show author email instead of name \n(Default: off)\",\n             flags = 2,\n             callback = 0x0,\n             defval = 256\n           }, {\n             type = OPTION_BIT,\n             short_name = 119,\n             long_name = 0x0,\n             value = 0x7e8190 <xdl_opts>,\n             argh = 0x0,\n             help = 0x584f7f \"Ignore whitespace differences\",\n             flags = 2,\n             callback = 0x0,\n             defval = 4\n           }, {\n             type = OPTION_BIT,\n             short_name = 0,\n             long_name = 0x5a2cf1 \"minimal\",\n             value = 0x7e8190 <xdl_opts>,\n             argh = 0x0,\n             help = 0x583c98 \"Spend extra cycles to find better match\",\n             flags = 2,\n             callback = 0x0,\n             defval = 2\n           }, {\n             type = OPTION_STRING,\n             short_name = 83,\n             long_name = 0x0,\n             value = 0x7e8228 <revs_file>,\n             argh = 0x5b272a \"file\",\n             help = 0x583cc0 \"Use revisions from <file> instead of \ncalling git-rev-list\",\n             flags = 0,\n             callback = 0x0,\n             defval = 0\n           }, {\n             type = OPTION_STRING,\n             short_name = 0,\n             long_name = 0x59b571 \"contents\",\n             value = 0x7e8200 <contents_from>,\n             argh = 0x5b272a \"file\",\n             help = 0x583d00 \"Use <file>'s contents as the final image\",\n             flags = 0,\n             callback = 0x0,\n             defval = 0\n           }, {\n             type = OPTION_CALLBACK,\n             short_name = 67,\n             long_name = 0x0,\n             value = 0x7e8210 <opt>,\n             argh = 0x584f9d \"score\",\n             help = 0x583d30 \"Find line copies within and across files\",\n             flags = 1,\n             callback = 0x408280 <blame_copy_callback>,\n             defval = 0\n           }, {\n             type = OPTION_CALLBACK,\n             short_name = 77,\n             long_name = 0x0,\n             value = 0x7e8210 <opt>,\n             argh = 0x584f9d \"score\",\n             help = 0x583d60 \"Find line movements within and across files\",\n             flags = 1,\n             callback = 0x4082d9 <blame_move_callback>,\n             defval = 0\n           }, {\n             type = OPTION_CALLBACK,\n             short_name = 76,\n             long_name = 0x0,\n             value = 0x7e81e0 <range_list>,\n             argh = 0x584fa3 \"n,m\",\n             help = 0x583d90 \"Process only line range n,m, counting from \n1\",\n             flags = 0,\n             callback = 0x4e5311 <parse_opt_string_list>,\n             defval = 0\n           }, {\n             type = OPTION_CALLBACK,\n             short_name = 0,\n             long_name = 0x5a2c80 \"abbrev\",\n             value = 0x7e1b90 <abbrev>,\n             argh = 0x5ac835 \"n\",\n             help = 0x583dc0 \"use <n> digits to display SHA-1s\",\n             flags = 1,\n             callback = 0x4eda2e <parse_opt_abbrev_cb>,\n             defval = 0\n           }, {\n             type = OPTION_END,\n             short_name = 0,\n             long_name = 0x0,\n             value = 0x0,\n             argh = 0x0,\n             help = 0x0,\n             flags = 0,\n             callback = 0x0,\n             defval = 0\n           }}\n         ctx = {\n           argv = 0xcd77d8,\n           out = 0xcd77c0,\n           argc = 0,\n           cpidx = 2,\n           opt = 0x0,\n           flags = 5,\n           prefix = 0x0\n         }\n         cmd_is_annotate = <optimized out>\n         ranges = {\n           alloc = 0,\n           nr = 0,\n           ranges = 0x0\n         }\n         range_i = <optimized out>\n         anchor = <optimized out>\n#9  0x0000000000413d45 in cmd_annotate (argc=<optimized out>, \nargv=<optimized out>, prefix=0x0) at builtin/annotate.c:21\n         args = {\n           argv = 0xcd77c0,\n           argc = 3,\n           alloc = 24\n         }\n         i = <optimized out>\n#10 0x000000000040f19f in run_builtin (argv=0x7fff44798280, argc=2, \np=0x7e3a58 <commands.lto_priv+24>) at git.c:351\n         status = <optimized out>\n         help = <optimized out>\n         st = {\n           st_dev = 1,\n           st_ino = 0,\n           st_nlink = 140734342201968,\n           st_mode = 543312808,\n           st_uid = 32740,\n           st_gid = 0,\n           __pad0 = 1,\n           st_rdev = 140734342201360,\n           st_size = 140734342203448,\n           st_blksize = 140617791849317,\n           st_blocks = 0,\n           st_atim = {\n             tv_sec = 140617776354880,\n             tv_nsec = 13463760\n           },\n           st_mtim = {\n             tv_sec = 140734342204489,\n             tv_nsec = 140734342201360\n           },\n           st_ctim = {\n             tv_sec = 140734342203448,\n             tv_nsec = 140734342201968\n           },\n           __unused = {140734342201568, 0, 5074673}\n         }\n         prefix = <optimized out>\n#11 handle_builtin (argc=2, argv=0x7fff44798280) at git.c:530\n         p = 0x7e3a58 <commands.lto_priv+24>\n         cmd = <optimized out>\n         i = <optimized out>\n#12 0x0000000000405ac5 in run_argv (argv=0x7fff447980b8, \nargcp=0x7fff447980ac) at git.c:576\n         done_alias = 0\n#13 main (argc=2, av=<optimized out>) at git.c:685\n         done_help = 0\n         was_alias = 0\n         argv = 0x7fff44798280\n         cmd = 0x7fff44798838 \"annotate\"\n(gdb)\n"},{"id":"255795","messageId":"20150209012858.GB21072@peff.net","threadId":"38531","inReplyTo":"54D7D634.2050807@aegee.org","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-02-09T01:28:58Z","receivedAt":"2015-02-09T01:28:58Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Feb 08, 2015 at 10:33:40PM +0100, Dilyan Palauzov wrote:\n\n> I use git 2.2.2 and on my system git annotate crashed with the following\n> log.\n\nI couldn't reproduce it with a few simple examples. Is it possible for\nyou to show us the repository and command that caused this?\n\n> (gdb) bt full\n> #0  0x00007fe420649655 in raise () from /lib64/libc.so.6\n> No symbol table info available.\n> #1  0x00007fe42064aad8 in abort () from /lib64/libc.so.6\n> No symbol table info available.\n> #2  0x00007fe42068928b in __libc_message () from /lib64/libc.so.6\n> No symbol table info available.\n> #3  0x00007fe42068ee36 in malloc_printerr () from /lib64/libc.so.6\n> No symbol table info available.\n> #4  0x00007fe42068fbb3 in _int_free () from /lib64/libc.so.6\n> No symbol table info available.\n> #5  0x000000000041335a in strbuf_release (sb=0x7fff44797480) at strbuf.c:32\n>         sb = 0x7fff44797480\n\nSo presumably the sb->buf we pass to free() is not valid. Given the\naddress of the strbuf, and the address of the commit_info here:\n\n> #6  commit_info_destroy (ci=0x7fff447973e0) at builtin/blame.c:1646\n> No locals.\n\nwe are at offset 160, which is almost certainly the ci->summary strbuf.\nWhich is:\n\n>           summary = {\n>             alloc = 26,\n>             len = 25,\n>             buf = 0xe05b50 <incomplete sequence \\330>\n>           }\n\nThe alloc/len look reasonable, but the buffer looks odd (it should\nprobably have some actual text in it). I don't see anywhere in the code\nthat we assign to that buffer or do anything questionable, though. We\njust strbuf_add and then eventually strbuf_release it. You cannot even\nget into this situation by calling strbuf_release twice, as it sets the\npointer to a known value after it is freed.\n\n-Peff\n"},{"id":"255798","messageId":"CAPig+cQ7iYq_c_MstfsMzArCZFM_0ORRa8Gi-YckaeZiWKN=4w@mail.gmail.com","threadId":"38531","inReplyTo":"20150209012858.GB21072@peff.net","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-02-09T04:39:58Z","receivedAt":"2015-02-09T04:39:58Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sun, Feb 8, 2015 at 8:28 PM, Jeff King <peff@peff.net> wrote:\n> On Sun, Feb 08, 2015 at 10:33:40PM +0100, Dilyan Palauzov wrote:\n>\n>> I use git 2.2.2 and on my system git annotate crashed with the following\n>> log.\n>\n> I couldn't reproduce it with a few simple examples. Is it possible for\n> you to show us the repository and command that caused this?\n\nI also was unable to reproduce on either Mac OS X or Linux with git\n2.2.2. Clues from the traceback suggest the cyrus-imapd project and\nannotation of timsieved/parser.c. I tried:\n\n  git clone git://git.cyrusimap.org/cyrus-imapd/\n  cd cyrus-imapd\n  git --no-pager annotate timsieved/parser.c\n"},{"id":"255813","messageId":"54D88D03.1090501@aegee.org","threadId":"38531","inReplyTo":"CAPig+cQ7iYq_c_MstfsMzArCZFM_0ORRa8Gi-YckaeZiWKN=4w@mail.gmail.com","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Dilyan Palauzov","fromEmail":"dilyan.palauzov@aegee.org","sentAt":"2015-02-09T10:33:39Z","receivedAt":"2015-02-09T10:33:39Z","isPatch":false,"sender":{"key":"dilyan.palauzov@aegee.org","avatar":null},"body":"Hello,\n\nthe point is that with exactly the same configuration on one computer \nthere is crash and on another one things work just fine.\n\nI found out that line builtin/blame.c:1675 makes the problems:\n\nif (len) {\n   printf(\"blame.c:1676, subject: %s, len: %i\\n\", subject, len);\n-->  strbuf_add(&ret->summary, subject, len);  <--\n} else\n    strbuf_addf(&ret->summary, \"(%s)\", sha1_to_hex(commit->object.sha1));\n\ncommenting it out and compiling does not lead to crashing git anymore. \nYou can find below the output of printf.\n\ngit clone git://git.cyrusimap.org/cyrus-imapd\ngit annotate timsieved/parser.c\n\n*** Error in `git': double free or corruption (!prev): \n0x00000000022e4b40 ***\n======= Backtrace: =========\n/lib64/libc.so.6(+0x7ae36)[0x7f8f0fe2ce36]\n/lib64/libc.so.6(+0x7bbb3)[0x7f8f0fe2dbb3]\ngit[0x41330b]\ngit[0x413cf6]\ngit[0x40f14f]\ngit[0x405ac5]\n/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f8f0fdd3a25]\ngit[0x4069b1]\n======= Memory map: ========\n00400000-005e1000 r-xp 00000000 09:00 36163 \n  /usr/bin/git\n007e0000-007e1000 r--p 001e0000 09:00 36163 \n  /usr/bin/git\n007e1000-007e8000 rw-p 001e1000 09:00 36163 \n  /usr/bin/git\n007e8000-00823000 rw-p 00000000 00:00 0\n021c1000-023e8000 rw-p 00000000 00:00 0 \n  [heap]\n7f8f07bc3000-7f8f07c04000 rw-p 00000000 00:00 0\n7f8f07c23000-7f8f07c25000 rw-p 00000000 00:00 0\n7f8f07c25000-7f8f07c51000 r--p 00000000 09:01 4594075 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-cdc8608c4304cfdf5bbe28257fef594357bdd721.pack\n7f8f07c51000-7f8f07d20000 r--p 00000000 09:01 4595166 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-2940fa128dee37fb4e0e5823cd6f9dff46da7c2b.pack\n7f8f07d20000-7f8f07ea1000 r--p 00000000 09:01 4595225 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-115dbdfb66491440464600a7ef7ab1f85b3ad170.pack\n7f8f07ea1000-7f8f07fa6000 r--p 00000000 09:01 4595449 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-6278b37ee884848bb77280ddcd95700f9c933d87.pack\n7f8f07fa6000-7f8f080b4000 r--p 00000000 09:01 4594150 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-dca01159e601a45ed0a79ad9844d621698c6aafd.pack\n7f8f080b4000-7f8f0918c000 r--p 00000000 09:01 4594031 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-a918d22dbf1c50ae9bfcf479a84877cca3fae689.pack\n7f8f0918c000-7f8f0944f000 r--p 00000000 09:01 4594554 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-a918d22dbf1c50ae9bfcf479a84877cca3fae689.idx\n7f8f0944f000-7f8f0f998000 r--p 00000000 09:00 3719644 \n  /lib64/locale/locale-archive\n7f8f0f998000-7f8f0f99b000 r-xp 00000000 09:00 3719642 \n  /lib64/libdl-2.17.so\n7f8f0f99b000-7f8f0fb9a000 ---p 00003000 09:00 3719642 \n  /lib64/libdl-2.17.so\n7f8f0fb9a000-7f8f0fb9b000 r--p 00002000 09:00 3719642 \n  /lib64/libdl-2.17.so\n7f8f0fb9b000-7f8f0fb9c000 rw-p 00003000 09:00 3719642 \n  /lib64/libdl-2.17.so\n7f8f0fb9c000-7f8f0fbb2000 r-xp 00000000 09:00 33467 \n  /usr/lib64/libgcc_s.so.1\n7f8f0fbb2000-7f8f0fdb1000 ---p 00016000 09:00 33467 \n  /usr/lib64/libgcc_s.so.1\n7f8f0fdb1000-7f8f0fdb2000 rw-p 00015000 09:00 33467 \n  /usr/lib64/libgcc_s.so.1\n7f8f0fdb2000-7f8f0ff58000 r-xp 00000000 09:00 3719720 \n  /lib64/libc-2.17.so\n7f8f0ff58000-7f8f10157000 ---p 001a6000 09:00 3719720 \n  /lib64/libc-2.17.so\n7f8f10157000-7f8f1015b000 r--p 001a5000 09:00 3719720 \n  /lib64/libc-2.17.so\n7f8f1015b000-7f8f1015d000 rw-p 001a9000 09:00 3719720 \n  /lib64/libc-2.17.so\n7f8f1015d000-7f8f10161000 rw-p 00000000 00:00 0\n7f8f10161000-7f8f10178000 r-xp 00000000 09:00 3719597 \n  /lib64/libpthread-2.17.so\n7f8f10178000-7f8f10377000 ---p 00017000 09:00 3719597 \n  /lib64/libpthread-2.17.so\n7f8f10377000-7f8f10378000 r--p 00016000 09:00 3719597 \n  /lib64/libpthread-2.17.so\n7f8f10378000-7f8f10379000 rw-p 00017000 09:00 3719597 \n  /lib64/libpthread-2.17.so\n7f8f10379000-7f8f1037d000 rw-p 00000000 00:00 0\n7f8f1037d000-7f8f10384000 r-xp 00000000 09:00 3719705 \n  /lib64/librt-2.17.so\n7f8f10384000-7f8f10583000 ---p 00007000 09:00 3719705 \n  /lib64/librt-2.17.so\n7f8f10583000-7f8f10584000 r--p 00006000 09:00 3719705 \n  /lib64/librt-2.17.so\n7f8f10584000-7f8f10585000 rw-p 00007000 09:00 3719705 \n  /lib64/librt-2.17.so\n7f8f10585000-7f8f10587000 r-xp 00000000 09:00 37211 \n  /usr/lib64/libcharset.so.1.0.0\n7f8f10587000-7f8f10786000 ---p 00002000 09:00 37211 \n  /usr/lib64/libcharset.so.1.0.0\n7f8f10786000-7f8f10787000 r--p 00001000 09:00 37211 \n  /usr/lib64/libcharset.so.1.0.0\n7f8f10787000-7f8f10788000 rw-p 00002000 09:00 37211 \n  /usr/lib64/libcharset.so.1.0.0\n7f8f10788000-7f8f10949000 r-xp 00000000 09:00 34361 \n  /usr/lib64/libcrypto.so.1.0.0\n7f8f10949000-7f8f10b49000 ---p 001c1000 09:00 34361 \n  /usr/lib64/libcrypto.so.1.0.0\n7f8f10b49000-7f8f10b71000 rw-p 001c1000 09:00 34361 \n  /usr/lib64/libcrypto.so.1.0.0\n7f8f10b71000-7f8f10b74000 rw-p 00000000 00:00 0\n7f8f10b74000-7f8f10b90000 r-xp 00000000 09:00 215770 \n  /usr/lib/libz.so.1.2.8\n7f8f10b90000-7f8f10d8f000 ---p 0001c000 09:00 215770 \n  /usr/lib/libz.so.1.2.8\n7f8f10d8f000-7f8f10d90000 r--p 0001b000 09:00 215770 \n  /usr/lib/libz.so.1.2.8\n7f8f10d90000-7f8f10d91000 rw-p 0001c000 09:00 215770 \n  /usr/lib/libz.so.1.2.8\n7f8f10d91000-7f8f10e0d000 r-xp 00000000 09:00 215845 \n  /usr/lib/libpcre.so.1.2.4\n7f8f10e0d000-7f8f1100c000 ---p 0007c000 09:00 215845 \n  /usr/lib/libpcre.so.1.2.4\n7f8f1100c000-7f8f1100d000 r--p 0007b000 09:00 215845 \n  /usr/lib/libpcre.so.1.2.4\n7f8f1100d000-7f8f1100e000 rw-p 0007c000 09:00 215845 \n  /usr/lib/libpcre.so.1.2.4\n7f8f1100e000-7f8f1102f000 r-xp 00000000 09:00 3719713 \n  /lib64/ld-2.17.so\n7f8f1104e000-7f8f11050000 r--p 00000000 09:01 4594076 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-cdc8608c4304cfdf5bbe28257fef594357bdd721.idx\n7f8f11050000-7f8f1105a000 r--p 00000000 09:01 4594116 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-ad62caaf95e2bad3a13acd988f7a6f07688561b4.idx\n7f8f1105a000-7f8f1105b000 r--p 00000000 09:01 4595125 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-d1451c187b47b3cf453f5cccf4f48196e328e1f1.idx\n7f8f1105b000-7f8f1105d000 r--p 00000000 09:01 4595373 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-3d3b97a2faba97f859e7494ceb203c7d843d92f3.idx\n7f8f1105d000-7f8f1105f000 r--p 00000000 09:01 4595167 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-2940fa128dee37fb4e0e5823cd6f9dff46da7c2b.idx\n7f8f1105f000-7f8f11066000 r--p 00000000 09:01 4595168 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-9953e8d5a616b261f6f39fb9cb8ebea445e20103.idx\n7f8f11066000-7f8f11068000 r--p 00000000 09:01 4595226 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-6b8df09fd5d73b9aabc00ab842aa36a5fac3b3c0.idx\n7f8f11068000-7f8f11079000 r--p 00000000 09:01 4595356 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-115dbdfb66491440464600a7ef7ab1f85b3ad170.idx\n7f8f11079000-7f8f1107d000 r--p 00000000 09:01 4595450 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-6278b37ee884848bb77280ddcd95700f9c933d87.idx\n7f8f1107d000-7f8f1107f000 r--p 00000000 09:01 4596221 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-55c71a461de5f4053accaab5f689e203c9214edc.idx\n7f8f1107f000-7f8f11082000 r--p 00000000 09:01 4596222 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-dca01159e601a45ed0a79ad9844d621698c6aafd.idx\n7f8f11082000-7f8f11102000 rw-p 00000000 00:00 0\n7f8f11102000-7f8f111fe000 r--p 00000000 09:01 4596235 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-cc45af7de78fb5126dbcb26249372642a530b0d0.pack\n7f8f111fe000-7f8f11205000 rw-p 00000000 00:00 0\n7f8f1122b000-7f8f1122f000 r--p 00000000 09:01 4596236 \n \n/mnt/new/home/didopalauzov/cyrus-imapd/.git/objects/pack/pack-cc45af7de78fb5126dbcb26249372642a530b0d0.idx\n7f8f1122f000-7f8f11230000 r--p 00021000 09:00 3719713 \n  /lib64/ld-2.17.so\n7f8f11230000-7f8f11232000 rw-p 00022000 09:00 3719713 \n  /lib64/ld-2.17.so\n7fffd5411000-7fffd5432000 rw-p 00000000 00:00 0 \n  [stack]\n7fffd55f1000-7fffd55f2000 r-xp 00000000 00:00 0 \n  [vdso]\nffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 \n  [vsyscall]\nblame.c:1676, subject: rewrite of the parser; survives -Wall\n, len: 37\nblame.c:1676, subject: updated copyright\n, len: 17\nblame.c:1676, subject: *** empty log message ***\n, len: 25\nlines 1-6/6 (END)Aborted\n\nGreetings\n   Dilyan\n\nOn 09.02.2015 05:39, Eric Sunshine wrote:\n> On Sun, Feb 8, 2015 at 8:28 PM, Jeff King <peff@peff.net> wrote:\n>> On Sun, Feb 08, 2015 at 10:33:40PM +0100, Dilyan Palauzov wrote:\n>>\n>>> I use git 2.2.2 and on my system git annotate crashed with the following\n>>> log.\n>>\n>> I couldn't reproduce it with a few simple examples. Is it possible for\n>> you to show us the repository and command that caused this?\n>\n> I also was unable to reproduce on either Mac OS X or Linux with git\n> 2.2.2. Clues from the traceback suggest the cyrus-imapd project and\n> annotation of timsieved/parser.c. I tried:\n>\n>    git clone git://git.cyrusimap.org/cyrus-imapd/\n>    cd cyrus-imapd\n>    git --no-pager annotate timsieved/parser.c\n>\n"},{"id":"255831","messageId":"20150209184612.GA4327@flurp.local","threadId":"38531","inReplyTo":"54D88D03.1090501@aegee.org","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-02-09T18:46:12Z","receivedAt":"2015-02-09T18:46:12Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Feb 09, 2015 at 11:33:39AM +0100, Dilyan Palauzov wrote:\n> the point is that with exactly the same configuration on one\n> computer there is crash and on another one things work just fine.\n> \n> I found out that line builtin/blame.c:1675 makes the problems:\n> \n> if (len) {\n>   printf(\"blame.c:1676, subject: %s, len: %i\\n\", subject, len);\n> -->  strbuf_add(&ret->summary, subject, len);  <--\n> } else\n>    strbuf_addf(&ret->summary, \"(%s)\", sha1_to_hex(commit->object.sha1));\n> \n> commenting it out and compiling does not lead to crashing git\n> anymore. You can find below the output of printf.\n> \n> git clone git://git.cyrusimap.org/cyrus-imapd\n> git annotate timsieved/parser.c\n> \n> *** Error in `git': double free or corruption (!prev):\n> 0x00000000022e4b40 ***\n\nThere is a bit of suspicious code in builtin/blame.c where it is\ndestroying the commit_info without ever initializing it, and this\nhappens many times when blaming 'timsieved/parser.c'. Does the\nfollowing patch fix the problem for you?\n\n--- 8< ---\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex 303e217..a3cc972 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -2085,7 +2085,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n \n \tfor (e = sb->ent; e; e = e->next) {\n \t\tstruct origin *suspect = e->suspect;\n-\t\tstruct commit_info ci;\n \t\tint num;\n \n \t\tif (compute_auto_abbrev)\n@@ -2096,6 +2095,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n \t\tif (longest_file < num)\n \t\t\tlongest_file = num;\n \t\tif (!(suspect->commit->object.flags & METAINFO_SHOWN)) {\n+\t\t\tstruct commit_info ci;\n \t\t\tsuspect->commit->object.flags |= METAINFO_SHOWN;\n \t\t\tget_commit_info(suspect->commit, &ci, 1);\n \t\t\tif (*option & OUTPUT_SHOW_EMAIL)\n@@ -2104,6 +2104,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n \t\t\t\tnum = utf8_strwidth(ci.author.buf);\n \t\t\tif (longest_author < num)\n \t\t\t\tlongest_author = num;\n+\t\t\tcommit_info_destroy(&ci);\n \t\t}\n \t\tnum = e->s_lno + e->num_lines;\n \t\tif (longest_src_lines < num)\n@@ -2113,8 +2114,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n \t\t\tlongest_dst_lines = num;\n \t\tif (largest_score < ent_score(sb, e))\n \t\t\tlargest_score = ent_score(sb, e);\n-\n-\t\tcommit_info_destroy(&ci);\n \t}\n \tmax_orig_digits = decimal_width(longest_src_lines);\n \tmax_digits = decimal_width(longest_dst_lines);\n-- \n2.3.0.rc2.191.g303d43c\n--- 8< ---\n"},{"id":"255839","messageId":"54D90906.7000507@aegee.org","threadId":"38531","inReplyTo":"20150209184612.GA4327@flurp.local","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Dilyan Palauzov","fromEmail":"dilyan.palauzov@aegee.org","sentAt":"2015-02-09T19:22:46Z","receivedAt":"2015-02-09T19:22:46Z","isPatch":false,"sender":{"key":"dilyan.palauzov@aegee.org","avatar":null},"body":"Hello,\n\nthis patch fixes the problem for me.\n\nThanks\n   Dilyan\n\nOn 09.02.2015 19:46, Eric Sunshine wrote:\n> On Mon, Feb 09, 2015 at 11:33:39AM +0100, Dilyan Palauzov wrote:\n>> the point is that with exactly the same configuration on one\n>> computer there is crash and on another one things work just fine.\n>>\n>> I found out that line builtin/blame.c:1675 makes the problems:\n>>\n>> if (len) {\n>>    printf(\"blame.c:1676, subject: %s, len: %i\\n\", subject, len);\n>> -->  strbuf_add(&ret->summary, subject, len);  <--\n>> } else\n>>     strbuf_addf(&ret->summary, \"(%s)\", sha1_to_hex(commit->object.sha1));\n>>\n>> commenting it out and compiling does not lead to crashing git\n>> anymore. You can find below the output of printf.\n>>\n>> git clone git://git.cyrusimap.org/cyrus-imapd\n>> git annotate timsieved/parser.c\n>>\n>> *** Error in `git': double free or corruption (!prev):\n>> 0x00000000022e4b40 ***\n>\n> There is a bit of suspicious code in builtin/blame.c where it is\n> destroying the commit_info without ever initializing it, and this\n> happens many times when blaming 'timsieved/parser.c'. Does the\n> following patch fix the problem for you?\n>\n> --- 8< ---\n> diff --git a/builtin/blame.c b/builtin/blame.c\n> index 303e217..a3cc972 100644\n> --- a/builtin/blame.c\n> +++ b/builtin/blame.c\n> @@ -2085,7 +2085,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>\n>   \tfor (e = sb->ent; e; e = e->next) {\n>   \t\tstruct origin *suspect = e->suspect;\n> -\t\tstruct commit_info ci;\n>   \t\tint num;\n>\n>   \t\tif (compute_auto_abbrev)\n> @@ -2096,6 +2095,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>   \t\tif (longest_file < num)\n>   \t\t\tlongest_file = num;\n>   \t\tif (!(suspect->commit->object.flags & METAINFO_SHOWN)) {\n> +\t\t\tstruct commit_info ci;\n>   \t\t\tsuspect->commit->object.flags |= METAINFO_SHOWN;\n>   \t\t\tget_commit_info(suspect->commit, &ci, 1);\n>   \t\t\tif (*option & OUTPUT_SHOW_EMAIL)\n> @@ -2104,6 +2104,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>   \t\t\t\tnum = utf8_strwidth(ci.author.buf);\n>   \t\t\tif (longest_author < num)\n>   \t\t\t\tlongest_author = num;\n> +\t\t\tcommit_info_destroy(&ci);\n>   \t\t}\n>   \t\tnum = e->s_lno + e->num_lines;\n>   \t\tif (longest_src_lines < num)\n> @@ -2113,8 +2114,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>   \t\t\tlongest_dst_lines = num;\n>   \t\tif (largest_score < ent_score(sb, e))\n>   \t\t\tlargest_score = ent_score(sb, e);\n> -\n> -\t\tcommit_info_destroy(&ci);\n>   \t}\n>   \tmax_orig_digits = decimal_width(longest_src_lines);\n>   \tmax_digits = decimal_width(longest_dst_lines);\n>\n"},{"id":"255847","messageId":"xmqq7fvqbyhw.fsf@gitster.dls.corp.google.com","threadId":"38531","inReplyTo":"20150209184612.GA4327@flurp.local","subject":"Re: git 2.2.2 annotate crash (strbuf.c:32)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-09T20:50:35Z","receivedAt":"2015-02-09T20:50:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> There is a bit of suspicious code in builtin/blame.c where it is\n> destroying the commit_info without ever initializing it,...\n\nGood eyes.  I wonder why the compiler does not notice it.\n\nIt seems that this came from ea02ffa3 (mailmap:\nsimplify map_user() interface, 2013-01-05) and dates back to 1.8.2\nor so.\n\n> diff --git a/builtin/blame.c b/builtin/blame.c\n> index 303e217..a3cc972 100644\n> --- a/builtin/blame.c\n> +++ b/builtin/blame.c\n> @@ -2085,7 +2085,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>  \n>  \tfor (e = sb->ent; e; e = e->next) {\n>  \t\tstruct origin *suspect = e->suspect;\n> -\t\tstruct commit_info ci;\n>  \t\tint num;\n>  \n>  \t\tif (compute_auto_abbrev)\n> @@ -2096,6 +2095,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>  \t\tif (longest_file < num)\n>  \t\t\tlongest_file = num;\n>  \t\tif (!(suspect->commit->object.flags & METAINFO_SHOWN)) {\n> +\t\t\tstruct commit_info ci;\n>  \t\t\tsuspect->commit->object.flags |= METAINFO_SHOWN;\n>  \t\t\tget_commit_info(suspect->commit, &ci, 1);\n>  \t\t\tif (*option & OUTPUT_SHOW_EMAIL)\n> @@ -2104,6 +2104,7 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>  \t\t\t\tnum = utf8_strwidth(ci.author.buf);\n>  \t\t\tif (longest_author < num)\n>  \t\t\t\tlongest_author = num;\n> +\t\t\tcommit_info_destroy(&ci);\n>  \t\t}\n>  \t\tnum = e->s_lno + e->num_lines;\n>  \t\tif (longest_src_lines < num)\n> @@ -2113,8 +2114,6 @@ static void find_alignment(struct scoreboard *sb, int *option)\n>  \t\t\tlongest_dst_lines = num;\n>  \t\tif (largest_score < ent_score(sb, e))\n>  \t\t\tlargest_score = ent_score(sb, e);\n> -\n> -\t\tcommit_info_destroy(&ci);\n>  \t}\n>  \tmax_orig_digits = decimal_width(longest_src_lines);\n>  \tmax_digits = decimal_width(longest_dst_lines);\n"}]}