From: Noam Postavsky <npostavs@users.sourceforge.net>
To: git@vger.kernel.org
Subject: [BUG] A part of an edge from an octopus merge gets colored, even with --color=never
Date: Sun, 15 May 2016 09:05:25 -0400 [thread overview]
Message-ID: <CAM-tV-_Easz+HA0GX0YkY4FZ2LithQy0+omq64D-OoHKkRe55A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
With a certain topology involving an octopus merge, git log --graph
--oneline --all --color=never produces output which includes some ANSI
escape code coloring. Attached is a script to reproduce the problem
(creates a git repository in subdir log-format-test), along with
sample graph and valgrind output (indicates some unitialialized memory
access).
I've observed the problem with Windows git versions 2.7.0, 2.5.3.
I've NOT observed it with 1.9.5,
On GNU/Linux the symptom only appears when running with valgrind, I
tried versions
2.8.0, and 2.8.2.402.gedec370 (the last is where the valgrind output comes from)
[-- Attachment #2: graph.log --]
[-- Type: text/plain, Size: 142 bytes --]
* e98205a c
| *^[[31m-^[[m^[[31m.^[[m 808603b merge a b
| |\ \
|/ / /
| | * 8886a4e b
| * | 2d8743f a
| |/
* | e09af19 1
|/
* 773004e 0
[-- Attachment #3: test-multiway-merge.sh --]
[-- Type: application/x-sh, Size: 660 bytes --]
[-- Attachment #4: valgrind.log --]
[-- Type: text/plain, Size: 5512 bytes --]
==11287== Memcheck, a memory error detector
==11287== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==11287== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==11287== Command: /home/npostavs/src/git/git log --oneline --graph --color=never --all
==11287==
==11287== Conditional jump or move depends on uninitialised value(s)
==11287== at 0x4B0A48: strbuf_write_column (graph.c:79)
==11287== by 0x4B0B3F: graph_draw_octopus_merge (graph.c:799)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287== by 0x4055AA: run_argv (git.c:582)
==11287==
==11287== Use of uninitialised value of size 8
==11287== at 0x4B05A0: column_get_color_code (graph.c:73)
==11287== by 0x4B0A51: strbuf_write_column (graph.c:80)
==11287== by 0x4B0B3F: graph_draw_octopus_merge (graph.c:799)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287==
==11287== Conditional jump or move depends on uninitialised value(s)
==11287== at 0x4B0AC5: strbuf_write_column (graph.c:82)
==11287== by 0x4B0B3F: graph_draw_octopus_merge (graph.c:799)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287== by 0x4055AA: run_argv (git.c:582)
==11287==
==11287== Conditional jump or move depends on uninitialised value(s)
==11287== at 0x4B0A48: strbuf_write_column (graph.c:79)
==11287== by 0x4B0B6F: graph_draw_octopus_merge (graph.c:802)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287== by 0x4055AA: run_argv (git.c:582)
==11287==
==11287== Use of uninitialised value of size 8
==11287== at 0x4B05A0: column_get_color_code (graph.c:73)
==11287== by 0x4B0A51: strbuf_write_column (graph.c:80)
==11287== by 0x4B0B6F: graph_draw_octopus_merge (graph.c:802)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287==
==11287== Conditional jump or move depends on uninitialised value(s)
==11287== at 0x4B0AC5: strbuf_write_column (graph.c:82)
==11287== by 0x4B0B6F: graph_draw_octopus_merge (graph.c:802)
==11287== by 0x4B1440: graph_output_commit_line (graph.c:837)
==11287== by 0x4B1726: graph_next_line (graph.c:1126)
==11287== by 0x4B1A5F: graph_show_commit (graph.c:1197)
==11287== by 0x4BCF37: show_log (log-tree.c:601)
==11287== by 0x4BD723: log_tree_commit (log-tree.c:879)
==11287== by 0x441E8C: cmd_log_walk (log.c:345)
==11287== by 0x443961: cmd_log (log.c:660)
==11287== by 0x4050F9: run_builtin (git.c:350)
==11287== by 0x405218: handle_builtin (git.c:536)
==11287== by 0x4055AA: run_argv (git.c:582)
==11287==
==11287==
==11287== HEAP SUMMARY:
==11287== in use at exit: 651,170 bytes in 191 blocks
==11287== total heap usage: 414 allocs, 223 frees, 1,756,967 bytes allocated
==11287==
==11287== LEAK SUMMARY:
==11287== definitely lost: 825 bytes in 8 blocks
==11287== indirectly lost: 1,515 bytes in 10 blocks
==11287== possibly lost: 0 bytes in 0 blocks
==11287== still reachable: 648,830 bytes in 173 blocks
==11287== suppressed: 0 bytes in 0 blocks
==11287== Rerun with --leak-check=full to see details of leaked memory
==11287==
==11287== For counts of detected and suppressed errors, rerun with: -v
==11287== Use --track-origins=yes to see where uninitialised values come from
==11287== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 0 from 0)
next reply other threads:[~2016-05-15 13:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-15 13:05 Noam Postavsky [this message]
2016-05-17 19:07 ` [BUG] A part of an edge from an octopus merge gets colored, even with --color=never Johannes Sixt
2016-05-17 19:45 ` Jeff King
2016-05-17 19:51 ` Jeff King
2016-05-17 19:55 ` Jeff King
2016-05-20 22:12 ` Noam Postavsky
2018-06-23 21:45 ` Noam Postavsky
2018-06-25 16:23 ` Jeff King
2018-06-30 12:47 ` Noam Postavsky
2018-08-06 18:34 ` Noam Postavsky
2018-08-06 21:28 ` Jeff King
2018-08-06 21:26 ` Jeff King
2018-09-02 0:34 ` Noam Postavsky
2018-09-08 16:13 ` Jeff King
2018-09-25 0:27 ` Noam Postavsky
2018-10-03 0:09 ` Noam Postavsky
2018-10-03 4:24 ` Jeff King
2018-10-03 22:32 ` Noam Postavsky
2018-10-09 4:51 ` Jeff King
2018-10-10 0:42 ` Noam Postavsky
2016-05-17 20:02 ` Johannes Sixt
2016-05-17 21:57 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-tV-_Easz+HA0GX0YkY4FZ2LithQy0+omq64D-OoHKkRe55A@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).