Re: makewhatis SEGV

Kirill A. Korinsky <[email protected]>
Newsgroups gmane.os.openbsd.bugs
Message-ID <[email protected]>
On Fri, 14 Aug 2026 13:47:05 +0200,
Ingo Schwarze <[email protected]> wrote:
> 
> Hi Thomas,
> 
> Thomas de Grivel wrote on Fri, Aug 14, 2026 at 12:14:27PM +0200:
> - On Fri, Aug 14, 2026, 11:46 Kirill A. Korinsky <[email protected]> wrote:
> !! On Fri, 14 Aug 2026 06:56:27 +0200, Thomas de Grivel wrote:
> --- On Thu, Aug 13, 2026 at 10:50 Stuart Henderson wrote:
> !!!! On 13 August 2026 09:24:56 Thomas de Grivel <[email protected]> wrote:
> 
> !!!!! # pkg_add -u
> !!!!! [...install ok...]
> !!!!! makewhatis([...a lot of manpage paths...]) failed: killed by signal
> !!!!! SEGV (core dumped)
> 
> ---- Without either a backtrace or the actual output, there's nothing
> ---- anyone can do with this report . Information about your system (openbsd
> ---- version, arch, etc) missing too.
> 
> !!! OpenBSD snapshot from yesterday, amd64.
> 
> -- Have you got installed erlang?
> 
> ! Yes
> 
> I also have erlang installed and can run pkg_add -u and makewhatis
> without problems, so the information about erlang is either
> irrelevant or insufficient.
> 
> Can you reproduce a crash by running just
> 
>   $ makewhatis
> 
> If that segfaults, then please try
> 
>   $ cd /usr/src/usr.bin/mandoc/
>   $ cvs up -dP
>   $ rm -f obj
>   $ make clean
>   $ make obj
>   $ make clean
>   $ make DEBUG='-g -O0'
>   $ cd obj
>   $ ln -s mandoc makewhatis
>   $ egdb ./makewhatis
>   (gdb) run
> 
> Then, at the point where it SEGVs, in addition to the full backtrace,
> it would be useful to know which file is being parsed at the time of
> the crash, by inspecting the relevant data in relevant high-level
> functions, including, but not necessarily limited to, the variable
> *filename in the function mparse_readfd(), file mandoc/read.c.
> 
> If a vanilla "makewhatis" with no arguments does not SEGV on your
> system, tracking it down becomes even harder.  In that case,
> triggering the bug likely requires parsing specific files in a
> specific order, and the crash is likely due to information leaking
> from one parse sequence to the next (which in and of itself is often
> already a bug), and then causing trouble by being bogus information
> in the new parsing context.
> 

I had saw it a few times and had reported to volker@ (Cc-ed) directly.

As far as I recall he said that some working on this, but I haven't recall who.

-- 
wbr, Kirill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.