NetBSD Problem Report #22113

Received: (qmail 29890 invoked by uid 605); 10 Jul 2003 05:56:44 -0000
Message-Id: <20030710055640.6138.qmail@g.primenet.com.au>
Date: 10 Jul 2003 15:56:40 +1000
From: gcw@primenet.com.au
Sender: gnats-bugs-owner@netbsd.org
Reply-To: gcw@primenet.com.au
To: gnats-bugs@gnats.netbsd.org
Subject: mutt needs GNU libiconv for now (and Citrus iconv needs fixing somehow)
X-Send-Pr-Version: 3.95

>Number:         22113
>Category:       pkg
>Synopsis:       mutt with Citrus iconv has problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 10 05:57:01 +0000 2003
>Closed-Date:    Thu Jul 10 06:29:56 +0000 2003
>Last-Modified:  Thu Jul 10 09:37:00 +0000 2003
>Originator:     Geoff C. Wing
>Release:        NetBSD 1.6U (2003/07/09)
>Organization:
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>
>Environment:
System: NetBSD g.primenet.com.au 1.6U NetBSD 1.6U (G) #0: Mon Jul 7 12:28:48 EST 2003 gcw@g.primenet.com.au:/usr/netbsd/src/sys/arch/i386/compile/G i386
Architecture: i386
Machine: i386
>Description:
	mutt coredumps on me with our iconv but is fine with GNU libiconv.
	This only occurs with specific messages (I haven't isolated which
	message yet - this year's spam mailbox is > 120MB)

	Backtrace wasn't massively helpful to me.  Maybe it is to someone else.

Program received signal SIGSEGV, Segmentation fault.
0xbda3d9ea in strcmp () from /usr/lib/libc.so.12
(gdb) bt
#0  0xbda3d9ea in strcmp () from /usr/lib/libc.so.12
#1  0xbda09e53 in _citrus_stdenc_close () from /usr/lib/libc.so.12
#2  0xbda0a5a2 in _citrus_iconv_open () from /usr/lib/libc.so.12
#3  0xbd9f4556 in iconv_open () from /usr/lib/libc.so.12
#4  0x08093afa in dladdr ()
#5  0x08093d15 in dladdr ()
#6  0x08088dc7 in dladdr ()
#7  0x08088f7d in dladdr ()
#8  0x08089034 in dladdr ()
#9  0x0807e1f9 in dladdr ()
#10 0x0806f049 in dladdr ()
#11 0x0806f373 in dladdr ()
#12 0x08075dbb in dladdr ()
#13 0x0805c3fd in dladdr ()
#14 0x0806e8ef in dladdr ()
#15 0x0804bcf4 in free ()

	Also, libc/citrus/citrus_stdenc.c:_citrus_stdenc_close() has
	parameter "ce" but there's a _DIAGASSERT(ci != NULL) in there;
	Similarly, _citrus_stdenc_open() has "rce" but "rcc" is checked.
	Presumably, actually trying to build a DIAGNOSTIC libc will
	spew out these and any others.

>How-To-Repeat:
	not sure yet.  May be a specifically crafted message or just a
	whole lot of messages which needed conversion which triggered
	it.

>Fix:
Patch for pkgsrc/mail/mutt/Makefile:
--- Makefile.org	2003-03-31 16:05:44.000000000 +1000
+++ Makefile	2003-07-10 15:43:50.000000000 +1000
@@ -19,6 +19,7 @@
 USE_PKGINSTALL=		yes
 GNU_CONFIGURE=		yes
 USE_PKGLOCALEDIR=	yes
+USE_GNU_ICONV=		yes
 CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR} \
 			--with-docdir=${PREFIX}/share/doc/mutt \
 			--without-included-gettext \
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->tron 
Responsible-Changed-By: tron 
Responsible-Changed-When: Thu Jul 10 06:21:55 UTC 2003 
Responsible-Changed-Why:  
I'm the maintainer of the "mutt" package. 

From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/22113 CVS commit: pkgsrc/mail/mutt
Date: Thu, 10 Jul 2003 06:25:28 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Thu Jul 10 06:25:27 UTC 2003

 Modified Files:
 	pkgsrc/mail/mutt: Makefile

 Log Message:
 Mark this package as incompatible with NetBSD's "iconv" library. This
 fixes PR pkg/22113 by Geoff C. Wing.


 To generate a diff of this commit:
 cvs rdiff -r1.94 -r1.95 pkgsrc/mail/mutt/Makefile

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

State-Changed-From-To: open->closed 
State-Changed-By: tron 
State-Changed-When: Thu Jul 10 06:27:36 UTC 2003 
State-Changed-Why:  
Using "USE_GNU_ICONV= yes" isn't correct because it would affect all 
platforms supported by "pkgsrc". I've therefor added this line: 

INCOMPAT_ICONV=         NetBSD-*-* 

The "mutt" package will now use the "libiconv" package under NetBSD-current 
again. Thanks for the bug report. 

From: Takuya SHIOZAKI <tshiozak@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/22113 CVS commit: src/lib/libc/citrus
Date: Thu, 10 Jul 2003 09:08:58 +0000 (UTC)

 Module Name:	src
 Committed By:	tshiozak
 Date:		Thu Jul 10 09:08:58 UTC 2003

 Modified Files:
 	src/lib/libc/citrus: citrus_iconv.c

 Log Message:
 add forgotten _CITRUS_HASH_REMOVE() at release_shared().
 This hopefully fixes the PR pkg/22113.


 To generate a diff of this commit:
 cvs rdiff -r1.2 -r1.3 src/lib/libc/citrus/citrus_iconv.c

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


From: "T.SHIOZAKI" <tshiozak@netbsd.org>
To: gcw@primenet.com.au
Cc: gnats-bugs@gnats.netbsd.org, tron@netbsd.org
Subject: Re: pkg/22113: mutt needs GNU libiconv for now (and Citrus iconv
 needs fixing somehow)
Date: Thu, 10 Jul 2003 18:23:39 +0900 (JST)

 Hi,

 From: gcw@primenet.com.au
 Subject: pkg/22113: mutt needs GNU libiconv for now (and Citrus iconv needs fixing somehow)
 Date: 10 Jul 2003 15:56:40 +1000
 Message-ID: <20030710055640.6138.qmail@g.primenet.com.au>

 > >Description:
 > 	mutt coredumps on me with our iconv but is fine with GNU libiconv.
 > 	This only occurs with specific messages (I haven't isolated which
 > 	message yet - this year's spam mailbox is > 120MB)

 Thanks for your report.
 I repeated this problem by using the following program:

 #include <iconv.h>
 #include <err.h>
 #include <stdio.h>
 #include <stdlib.h>

 int
 main()
 {
 	int i, j;
 	iconv_t cd;
 	const char *css[] = {
 		"ASCII",
 		"ISO-2022-JP"
 	};

 	setenv("ICONV_MAX_REUSE", "1", 1);
 	for (j=0; j<2; j++) {
 		for (i=0; i<sizeof(css)/sizeof(css[0]); i++) {
 			cd = iconv_open(css[i], "UTF-8");
 			if (cd == (iconv_t)-1)
 				err(EXIT_FAILURE, "iconv_open: %s", css[i]);
 			iconv_close(cd);
 		}
 	}

 	return 0;
 }

 And, I located the bug and got it fixed:


 > Subject: CVS commit: src/lib/libc/citrus
 > Message-Id: <20030710090858.9D958B004@cvs.netbsd.org>
 > 
 > Module Name:    src
 > Committed By:   tshiozak
 > Date:           Thu Jul 10 09:08:58 UTC 2003
 > 
 > Modified Files:
 >         src/lib/libc/citrus: citrus_iconv.c
 > 
 > Log Message:
 > add forgotten _CITRUS_HASH_REMOVE() at release_shared().
 > This hopefully fixes the PR pkg/22113.
 > 
 > 
 > To generate a diff of this commit:
 > cvs rdiff -r1.2 -r1.3 src/lib/libc/citrus/citrus_iconv.c

 If you would test it.


 --
 Takuya SHIOZAKI


From: Matthias Scheler <tron@zhadum.de>
To: "Geoff C. Wing" <gcw@primenet.com.au>
Cc: "T.SHIOZAKI" <tshiozak@netbsd.org>,
  NetBSD GNATS <gnats-bugs@gnats.netbsd.org>
Subject: Re: pkg/22113: mutt needs GNU libiconv for now (and Citrus iconv needs fixing somehow)
Date: Thu, 10 Jul 2003 11:36:02 +0200

 On Thu, Jul 10, 2003 at 09:28:03AM -0000, T.SHIOZAKI wrote:
 >  And, I located the bug and got it fixed:
 >  
 >  
 >  > Subject: CVS commit: src/lib/libc/citrus
 >  > Message-Id: <20030710090858.9D958B004@cvs.netbsd.org>
 >  > 
 >  > Module Name:    src
 >  > Committed By:   tshiozak
 >  > Date:           Thu Jul 10 09:08:58 UTC 2003
 >  > 
 >  > Modified Files:
 >  >         src/lib/libc/citrus: citrus_iconv.c
 >  > 
 >  > Log Message:
 >  > add forgotten _CITRUS_HASH_REMOVE() at release_shared().
 >  > This hopefully fixes the PR pkg/22113.
 >  > 
 >  > 
 >  > To generate a diff of this commit:
 >  > cvs rdiff -r1.2 -r1.3 src/lib/libc/citrus/citrus_iconv.c
 >  
 >  If you would test it.

 I've removed the "ICONV_INCOMPAT" definition from the "mutt" package.

 	Kind regarsd

 -- 
 Matthias Scheler                                  http://scheler.de/~matthias/
>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.