Date: Sun, 20 Oct 2013 23:20:10 +0200 From: Tijl Coosemans <tijl@FreeBSD.org> To: Ulrich =?ISO-8859-1?Q?Sp=F6rlein?= <uqs@FreeBSD.org> Cc: ports@FreeBSD.org, mickael.maillot@gmail.com, arved@FreeBSD.org, current@FreeBSD.org Subject: Re: iconv in base breaks multiple ports Message-ID: <20131020232010.384afeaf@kalimero.tijl.coosemans.org> In-Reply-To: <20131020182723.GE12255@acme.spoerlein.net> References: <20131020182723.GE12255@acme.spoerlein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/_FhqCom_6l4OGOHyRxa4oPh Content-Type: multipart/mixed; boundary="MP_/tVr=rFNcNdFRdRZSPzG_wBd" --MP_/tVr=rFNcNdFRdRZSPzG_wBd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sun, 20 Oct 2013 20:27:23 +0200 Ulrich Sp=F6rlein wrote: > ever since that iconv thing replaced the ports version, I run into > trouble with several ports that I have installed on a -CURRENT (now > stable/10 system). >=20 > These are not compile-time errors, but crashes or limited functionality > where I blame iconv :) >=20 > 1. www/newsbeuter crashes during startup, somewhere in the stfl code > that deals with wide char functions. >=20 > 2. devel/git: when using git-svn, it'll segfault in the perl code, not > sure how to get a backtrace here as gdb's follow-fork doesn't quite > work. >=20 > 3. multimedia/xbmc is no longer able to decode unicode filenames and > other things are broken. It spews an endless stream of=20 > 19:36:00 T:34594644992 ERROR: convert_checked iconv_open() failed from > WCHAR_T to UTF-8, errno=3D22(Invalid argument) > 19:36:00 T:34594644992 ERROR: convert_checked iconv_open() failed from > UTF-8 to WCHAR_T, errno=3D22(Invalid argument) > 19:37:00 T:34594644992 ERROR: Previous line repeats 9656 times. >=20 > Is my system hexed? I've rebuilt the ports/packages a dozen times now. > Am I seeing ghosts? Can you try the attached patch? It includes the one from http://www.freebsd.org/cgi/query-pr.cgi?pr=3D182994 --MP_/tVr=rFNcNdFRdRZSPzG_wBd Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=iconv.patch Index: lib/libc/iconv/citrus_mapper.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libc/iconv/citrus_mapper.c (revision 256803) +++ lib/libc/iconv/citrus_mapper.c (working copy) @@ -341,14 +341,15 @@ _citrus_mapper_open(struct _citrus_mappe /* open mapper */ UNLOCK(&cm_lock); ret =3D mapper_open(ma, &cm, module, variable); - WLOCK(&cm_lock); if (ret) - goto quit; + goto quit_unlocked; + WLOCK(&cm_lock); cm->cm_key =3D strdup(mapname); if (cm->cm_key =3D=3D NULL) { ret =3D errno; + UNLOCK(&cm_lock); _mapper_close(cm); - goto quit;=09 + goto quit_unlocked; } =20 /* insert to the cache */ @@ -359,7 +360,7 @@ _citrus_mapper_open(struct _citrus_mappe ret =3D 0; quit: UNLOCK(&cm_lock); - +quit_unlocked: return (ret); } =20 @@ -381,7 +382,9 @@ _citrus_mapper_close(struct _citrus_mapp _CITRUS_HASH_REMOVE(cm, cm_entry); free(cm->cm_key); } + UNLOCK(&cm_lock); mapper_close(cm); + return; quit: UNLOCK(&cm_lock); } --MP_/tVr=rFNcNdFRdRZSPzG_wBd-- --Sig_/_FhqCom_6l4OGOHyRxa4oPh Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iF4EAREKAAYFAlJkSQ4ACgkQfoCS2CCgtiv5UgD6A4Vcp2My+HnDePpsNWdYq8ow LX9m9a3HQv4voM1SgpwA/0ay0/tSheyoPiO4VHWp/1ITm78L/KsgIRfvZ5utsd4Z =KUW+ -----END PGP SIGNATURE----- --Sig_/_FhqCom_6l4OGOHyRxa4oPh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131020232010.384afeaf>