[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Man-db-devel] man-db Guix package: preconv segfaults when hard-code
From: |
Colin Watson |
Subject: |
Re: [Man-db-devel] man-db Guix package: preconv segfaults when hard-coded |
Date: |
Mon, 14 Jan 2019 16:48:11 +0000 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Jan 14, 2019 at 05:04:44PM +0100, Pierre Neidhardt wrote:
> man-db needs to find preconv. So what we would typically do is patch
> lib/encodings.c to point to preconv in the /gnu/store:
Have you considered sending a patch to add a --with-preconv option to
man-db's configure script? It already has similar options for most
other bits of groff, so it would seem reasonable.
> Surprisingly, man only displays this on every call:
>
> --8<---------------cut here---------------start------------->8---
> /gnu/store/6dv1q0s8rlf1ndaqx2qhnkiz9x4840ba-man-db-2.8.3/bin/man:
> /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv:
> Segmentation fault
> --8<---------------cut here---------------end--------------->8---
>
> However, calling
>
> --8<---------------cut here---------------start------------->8---
> echo "hêlló" |
> /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv
> -e UTF-8
> --8<---------------cut here---------------end--------------->8---
>
> works.
>
> It seems that it has something to do with libpipeline, but I'm not sure
> what.
>
> Is it wrong to create a pipeline with the full path to the executable?
A full path is just fine; it's passed as the first argument to execvp,
which accepts full paths.
Based on the GDB backtrace you posted in the Guix issue, it seems clear
to me that this is a groff bug involving some kind of fixed-size buffer.
If you can't work it out directly from the code, then valgrind should
help to pinpoint it.
--
Colin Watson address@hidden