Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2009 07:10:02 GMT
From:      John Wehle <john@feith.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/130831: csh(1) core dumps after building libiconv-1.1x from source on 7.0 and 7.1
Message-ID:  <200906270710.n5R7A2KO052775@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/130831; it has been noted by GNATS.

From: John Wehle <john@feith.com>
To: bug-followup@FreeBSD.org
Cc: david@backpack.com
Subject: Re: bin/130831: csh(1) core dumps after building  libiconv-1.1x from source on 7.0 and 7.1
Date: Sat, 27 Jun 2009 02:51:17 -0400 (EDT)

 I encountered the same problem using FreeBSD 7.2.
 
 There is code in bin/csh/iconv_stub.c which attempts to dynamically
 load and use iconv.  The problem is it makes assumptions as to
 which libiconv it's using (e.g. function names, calling conventions,
 parameters, etc).
 
 It's dangerous for there to be any code in the base applications
 / libraries that attempts to use functionality which is not supplied
 by the base libraries.
 
 The enclosed patch resolved the problem for me.
 
 -- John
 ------------------------8<------------------------------8<---------------
 --- bin/csh/iconv_stub.c.ORIGINAL	2009-04-14 23:14:26.000000000 -0400
 +++ bin/csh/iconv_stub.c	2009-05-18 21:45:20.000000000 -0400
 @@ -57,8 +57,10 @@ dl_iconv_open(const char *tocode, const 
  			return (iconv_t)-1;
  	} else {
  		initialized = 1;
 +/*
  		iconvlib = dlopen(ICONVLIB, RTLD_LAZY | RTLD_GLOBAL);
  		if (iconvlib == NULL)
 +*/
  			return (iconv_t)-1;
  		iconv_open = (iconv_open_t *)dlfunc(iconvlib, ICONV_OPEN);
  		dl_iconv = (dl_iconv_t *)dlfunc(iconvlib, ICONV_ENGINE);
 -------------------------------------------------------------------------
 |   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
 |    John Wehle    |     Fax: 1-215-540-5495  |                         |
 -------------------------------------------------------------------------
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906270710.n5R7A2KO052775>