NetBSD Problem Report #59562

From dogcow@flippy.babymeat.com  Tue Jul 29 18:59:36 2025
Return-Path: <dogcow@flippy.babymeat.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 148871A923C
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 Jul 2025 18:59:36 +0000 (UTC)
Message-Id: <20250729185416.0817DE957D@flippy.babymeat.com>
Date: Tue, 29 Jul 2025 13:54:16 -0500 (CDT)
From: dogcow@babymeat.com
Reply-To: dogcow@babymeat.com
To: gnats-bugs@NetBSD.org
Subject: man(1) and makemandb(8) crash in mdocml
X-Send-Pr-Version: 3.95

>Number:         59562
>Category:       lib
>Synopsis:       man(1) and makemandb(8) crash in mdocml
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 29 19:00:00 +0000 2025
>Closed-Date:    Wed Jul 30 19:23:04 +0000 2025
>Last-Modified:  Wed Jul 30 19:23:04 +0000 2025
>Originator:     dogcow@babymeat.com
>Release:        NetBSD 10.99.15
>Organization:

>Environment:


System: NetBSD flippy.babymeat.com 10.99.15 NetBSD 10.99.15 (FLIPPY) #25: Fri Jul 18 15:18:38 CDT 2025 dogcow@flippy.babymeat.com:/crap/obj/hgcurobj/src/hg/src/sys/arch/amd64/compile/FLIPPY amd64
Architecture: x86_64
Machine: amd64
>Description:
presumably because of the import of mdocml/mandoc 1.14.6, man/makemandb can
crash when fed certain manpages

>How-To-Repeat:
on current, install pkgsrc/devel/got (specifically, got-0.115), and run
`makemandb -f`:

Building temporary file cache
Performing index update
makemandb: Error in indexing `/usr/pkg/man/man3/libcurl-symbols.3'
makemandb: Error in indexing `/usr/pkg/man/man3/uuid_generate_time_safe.3'
makemandb: Error in indexing `/usr/pkg/man/man3/uuid_generate_time.3'
makemandb: Error in indexing `/usr/pkg/man/man3/uuid_generate_random.3'
assertion "n->tag == NULL" failed: file "/src/hg/src/external/bsd/mdocml/lib/libmandoc/../../dist/tag.c", line 186, function "tag_put"

alternately, just try `man got`:
man: Formatting manual page...
assertion "n->tag == NULL" failed: file "/src/hg/src/external/bsd/mdocml/lib/libmandoc/../../dist/tag.c", line 186, function "tag_put"

the file in question:
SHA256 (/usr/pkg/man/man1/got.1) = 4bd063aece39b3f179980d55cac78464bd5f8f1c50170278adc16014b80f11a4

>Fix:


>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 30 Jul 2025 13:24:01 +0000
State-Changed-Why:
I've asked upstream for help, and Ingo Schwarze helped tracking down
the relevant fixes (upstream was already fine). I've just committed
them to pkgsrc and src, please try them out.


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59562 CVS commit: pkgsrc/textproc/mandoc
Date: Wed, 30 Jul 2025 13:21:45 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Wed Jul 30 13:21:45 UTC 2025

 Modified Files:
 	pkgsrc/textproc/mandoc: Makefile distinfo
 Added Files:
 	pkgsrc/textproc/mandoc/patches: patch-tag.c

 Log Message:
 mandoc: merge upstream patch fixing a core dump with got(1).

 With help from Ingo Schwarze.

 Addresses PR 59562.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 pkgsrc/textproc/mandoc/Makefile
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/textproc/mandoc/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/mandoc/patches/patch-tag.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59562 CVS commit: src/external/bsd/mdocml/dist
Date: Wed, 30 Jul 2025 13:22:57 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Wed Jul 30 13:22:56 UTC 2025

 Modified Files:
 	src/external/bsd/mdocml/dist: tag.c

 Log Message:
 mandoc: merge upstream revisions 1.37 and 1.38 of tag.c

 Fixes PR 59562.

 With help from Ingo Schwarze.


 To generate a diff of this commit:
 cvs rdiff -u -r1.8 -r1.9 src/external/bsd/mdocml/dist/tag.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "T K Spindler (moof)" <dogcow@babymeat.com>
To: gnats-bugs@netbsd.org
Cc: lib-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, wiz@netbsd.org
Subject: Re: lib/59562 (man(1) and makemandb(8) crash in mdocml)
Date: Wed, 30 Jul 2025 09:48:16 -0700

 I confirm that man/makemandb now work as expected. Thanks!

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 30 Jul 2025 19:23:04 +0000
State-Changed-Why:
Fixed, thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.