From owner-freebsd-current@FreeBSD.ORG Sun Oct 20 21:20:24 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8EC91634; Sun, 20 Oct 2013 21:20:24 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay005.isp.belgacom.be (mailrelay005.isp.belgacom.be [195.238.6.171]) by mx1.freebsd.org (Postfix) with ESMTP id A918420CB; Sun, 20 Oct 2013 21:20:23 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkGALNHZFJbsUOq/2dsb2JhbABagwc4SL4+gSUXdIIlAQEFJy8jEAsYCSUPKh4GHIgBAQi9R44dgT8HhCkDkC2HW5IIgyY6gSw Received: from 170.67-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.67.170]) by relay.skynet.be with ESMTP; 20 Oct 2013 23:20:15 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r9KLKFtG046038; Sun, 20 Oct 2013 23:20:15 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 20 Oct 2013 23:20:10 +0200 From: Tijl Coosemans To: Ulrich =?ISO-8859-1?Q?Sp=F6rlein?= 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/_FhqCom_6l4OGOHyRxa4oPh"; protocol="application/pgp-signature" Cc: ports@FreeBSD.org, mickael.maillot@gmail.com, arved@FreeBSD.org, current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Oct 2013 21:20:24 -0000 --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--