From owner-svn-src-all@FreeBSD.ORG Sun Jun 19 13:35:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C00C8106566B; Sun, 19 Jun 2011 13:35:46 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFC2A8FC18; Sun, 19 Jun 2011 13:35:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5JDZkx2095717; Sun, 19 Jun 2011 13:35:46 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5JDZk11095714; Sun, 19 Jun 2011 13:35:46 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201106191335.p5JDZk11095714@svn.freebsd.org> From: Alexander Kabaev Date: Sun, 19 Jun 2011 13:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223296 - head/lib/libc/iconv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2011 13:35:46 -0000 Author: kan Date: Sun Jun 19 13:35:46 2011 New Revision: 223296 URL: http://svn.freebsd.org/changeset/base/223296 Log: Put a quick bandaid on internal citrus locking. The code is not quite right still, but it programs from deadlocking on themselves if one enables new citrus code by mistake. Modified: head/lib/libc/iconv/citrus_mapper.c head/lib/libc/iconv/iconv.c Modified: head/lib/libc/iconv/citrus_mapper.c ============================================================================== --- head/lib/libc/iconv/citrus_mapper.c Sun Jun 19 13:35:41 2011 (r223295) +++ head/lib/libc/iconv/citrus_mapper.c Sun Jun 19 13:35:46 2011 (r223296) @@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mappe goto quit; /* open mapper */ + UNLOCK; ret = mapper_open(ma, &cm, module, variable); + WLOCK; if (ret) goto quit; cm->cm_key = strdup(mapname); Modified: head/lib/libc/iconv/iconv.c ============================================================================== --- head/lib/libc/iconv/iconv.c Sun Jun 19 13:35:41 2011 (r223295) +++ head/lib/libc/iconv/iconv.c Sun Jun 19 13:35:46 2011 (r223296) @@ -85,7 +85,7 @@ _iconv_open(const char *out, const char errno = ENOMEM; return ((iconv_t)-1); } - + p = out_truncated; while (*p != 0) { if (p[0] == '/' && p[1] == '/') {