"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: move to next/prev blamed line from diff view
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 8 Jul 2022 16:57:50 +0200

Download raw body.

Thread
On Sat, Jul 09, 2022 at 12:28:58AM +1000, Mark Jamsek wrote:
> This is the log counterpart of the <>/,. key maps to traverse the blamed
> file from the diff view; that is, with a diff view opened from a given
> blamed line, load the previous or next lines with < or >, respectively.

I like it.

There is a NULL-deref when I move to a line that has not been annotated yet.
It helps to blame a file that takes a while for blame to finish, such as
got/got.c. And using the patience diff algorithm also slows it down.
Can you reproduce this crash?

0x0000050cba68bef4 in _libc_memcmp (s1=0x50ccfae9c20, s2=0x0, n=<optimized out>) at /usr/src/lib/libc/string/memcmp.c:46
46                              if (*p1++ != *p2++)
(gdb) bt
#0  0x0000050cba68bef4 in _libc_memcmp (s1=0x50ccfae9c20, s2=0x0, n=<optimized out>) at /usr/src/lib/libc/string/memcmp.c:46
#1  0x00000509f4bbb22f in got_object_id_cmp (id1=0x50ccfae9c20, id2=0x0) at /home/stsp/src/got/tog/../lib/object_parse.c:75
#2  0x00000509f4b99223 in input_diff_view (new_view=0x7f7ffffe4418, view=0x50cc9d2b800, ch=60) at /home/stsp/src/got/tog/tog.c:4785
#3  0x00000509f4ba4730 in view_input (new=0x7f7ffffe4418, done=0x7f7ffffe4408, view=0x50cc9d2b800, views=0x7f7ffffe4420) at /home/stsp/src/got/tog/tog.c:1442
#4  0x00000509f4b913e3 in view_loop (view=0x50cc9d2b800) at /home/stsp/src/got/tog/tog.c:1497
#5  0x00000509f4b8fb00 in cmd_blame (argc=1, argv=0x7f7ffffe4628) at /home/stsp/src/got/tog/tog.c:6047
#6  0x00000509f4b8e009 in main (argc=2, argv=0x7f7ffffe4620) at /home/stsp/src/got/tog/tog.c:8227
(gdb)