On Wed, May 17, 2023 at 07:03:22PM +0200, Omar Polo wrote:
> I discovered wdiff the other day thanks to falsifian, but it has a bad
> habit of crashing repeatedly.
>
> The TL;DR (and you're really better off not reading the sources) is
> that it malloc(0) and then passes the pointer to tgetstr() where it
> crashes due to a write attempt.
>
> Here's a way to address it. To try, both before and after the fix, try
>
> $ {got,git,cvs,rcsdiff,whatever} diff | wdiff -ad
>
> still in doubt if it's useful to waste spaces on the mirrors for a
> debug package for this.
Thanks! This fixes the segfault as far as I can tell.
I noticed something else while trying it, though: without help2man
installed, making the port fails and I see:
/usr/ports/pobj/wdiff-1.2.2/wdiff-1.2.2/build-aux/missing[81]:
help2man: not found
WARNING: 'help2man' is missing on your system.
You should only need it if you modified a dependency of a man
page.
You may want to install the GNU Help2man package:
<http://www.gnu.org/software/help2man/>
gmake[2]: *** [Makefile:1238: wdiff.1] Error 127
gmake[2]: Leaving directory
'/usr/ports/pobj/wdiff-1.2.2/wdiff-1.2.2/man'
gmake[1]: *** [Makefile:1144: all-recursive] Error 1
gmake[1]: Leaving directory '/usr/ports/pobj/wdiff-1.2.2/wdiff-1.2.2'
gmake: *** [Makefile:1084: all] Error 2
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2961
'/usr/ports/pobj/wdiff-1.2.2/.build_done': @cd /usr/ports/pobj/wdiff-1.2.2/w...)
*** Error 2 in /usr/ports/textproc/wdiff
(/usr/ports/infrastructure/mk/bsd.port.mk:2601 'all': @lock=wdiff-1.2.2p4;
export _LOCKS_HELD=" wd...)
--
James