On Sat, Apr 18, 2015 at 11:32:52AM +0200, Matthieu Herrb wrote:
> On Wed, Apr 15, 2015 at 11:51:00PM +0200, Matthieu Herrb wrote:
> > Hi,
> > 
> > $ git clone git://anongit.freedesktop.org/git/xorg/xserver
> > $ cd xserver
> > $ tig
> > 
> > $ gdb /usr/local/bin/tig tig.core
> > GNU gdb 6.3
> > Copyright 2004 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you are
> > welcome to change it and/or distribute copies of it under certain 
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB.  Type "show warranty" for details.
> > This GDB was configured as "amd64-unknown-openbsd5.7"...(no debugging 
> > symbols found)
> > 
> > Core was generated by `tig'.
> > Program terminated with signal 11, Segmentation fault.
> > (no debugging symbols found)
> > Loaded symbols for /usr/local/bin/tig
> > Reading symbols from /usr/local/lib/libiconv.so.6.0...(no debugging symbols 
> > found)...done.
> > Loaded symbols for /usr/local/lib/libiconv.so.6.0
> > Reading symbols from /usr/lib/libncursesw.so.14.0...done.
> > Loaded symbols for /usr/lib/libncursesw.so.14.0
> > Reading symbols from /usr/lib/libc.so.79.0...done.
> > Loaded symbols for /usr/lib/libc.so.79.0
> > Reading symbols from /usr/libexec/ld.so...done.
> > Loaded symbols for /usr/libexec/ld.so
> > #0  0x000003980d02c8e6 in shift_left () from /usr/local/bin/tig
> > (gdb) bt
> > #0  0x000003980d02c8e6 in shift_left () from /usr/local/bin/tig
> > #1  0x000003980d02d410 in graph_render_parents () from /usr/local/bin/tig
> > #2  0x000003980d02a5b4 in main_read () from /usr/local/bin/tig
> > #3  0x000003980d01ff9b in update_view () from /usr/local/bin/tig
> > #4  0x000003980d01b562 in get_input () from /usr/local/bin/tig
> > #5  0x000003980d00b1b6 in main () from /usr/local/bin/tig
> > (gdb)
> > 
> > Previous version (1.2.1) works well on the same repository.
> > 
> 
> FWIW: https://github.com/jonas/tig/issues/402
> 
> altough it works on Linux valgrind  finds an access error there
> too. So yet another example of a bug found by otto malloc !
> -- 
> Matthieu Herrb
> 

Jonas Fonseca (tig's developper) has fixed the issue upstreams
https://github.com/jonas/tig/commit/38e8e7d1527cab1d7c9d5cc8030c940d4e2485fb
Here's a patch for tig-2.1 in the ports tree. ok ?

Index: Makefile
===================================================================
RCS file: /cvs/OpenBSD/ports/devel/tig/Makefile,v
retrieving revision 1.13
diff -u -p -u -r1.13 Makefile
--- Makefile    19 Mar 2015 16:05:01 -0000      1.13
+++ Makefile    10 Jun 2015 06:41:05 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =              ncurses GIT repository browser
 DISTNAME =             tig-2.1
+REVISION =             0
 CATEGORIES =           devel
 HOMEPAGE =             http://jonas.nitro.dk/tig/
 MAINTAINER =           Tobias Ulmer <tobi...@tmux.org>
Index: patches/patch-src_graph-v2_c
===================================================================
RCS file: patches/patch-src_graph-v2_c
diff -N patches/patch-src_graph-v2_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_graph-v2_c        10 Jun 2015 06:44:09 -0000
@@ -0,0 +1,11 @@
+--- src/graph-v2.c.orig        Wed Mar 11 04:30:33 2015
++++ src/graph-v2.c     Wed Jun 10 08:43:43 2015
+@@ -668,7 +668,7 @@
+               symbol->matches_commit    = (strcmp(column->id, graph->id) == 
0);
+ 
+               symbol->shift_left        = shift_left(row, prev_row, pos);
+-              symbol->continue_shift    = shift_left(row, prev_row, pos + 1);
++              symbol->continue_shift    = (pos + 1 < row->size) ? 
shift_left(row, prev_row, pos + 1) : 0;
+               symbol->below_shift       = 
prev_row->columns[pos].symbol.shift_left;
+ 
+               symbol->new_column        = new_column(row, prev_row, pos);

-- 
Matthieu Herrb

Reply via email to