From owner-svn-ports-all@freebsd.org Wed Oct 7 22:11:30 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A184439F2D; Wed, 7 Oct 2020 22:11:30 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C67pV2BZzz469B; Wed, 7 Oct 2020 22:11:30 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FA311DEFA; Wed, 7 Oct 2020 22:11:30 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 097MBUO6016669; Wed, 7 Oct 2020 22:11:30 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 097MBUUF016668; Wed, 7 Oct 2020 22:11:30 GMT (envelope-from leres@FreeBSD.org) Message-Id: <202010072211.097MBUUF016668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Wed, 7 Oct 2020 22:11:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r551672 - head/devel/json-c X-SVN-Group: ports-head X-SVN-Commit-Author: leres X-SVN-Commit-Paths: head/devel/json-c X-SVN-Commit-Revision: 551672 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2020 22:11:30 -0000 Author: leres Date: Wed Oct 7 22:11:29 2020 New Revision: 551672 URL: https://svnweb.freebsd.org/changeset/ports/551672 Log: devel/json-c: Avoid use of newlocale(3) that results in increasing memory usage The json-c distribution began using newlocale(3) starting with 0.14. Unfortunately the FreeBSD implementation is not posix compliant and when called with a base does not modify and return it nor does it free it; it always allocates and returns a new locale, leaking the base locale. See the PR for a test program that demonstrates the json-c issue. Here is the upstream github issue: https://github.com/json-c/json-c/issues/668 The fix to the port is to comment out HAVE_USELOCALE in post-configure and avoid the use newlocale() for now. A fix for newlocale(3) is in progress: https://reviews.freebsd.org/D26522 So it is likely this problem will be solved in time for 12.3-RELEASE. PR: 249412 Approved by: sunpoet (maintainer timeout, 3 weeks) Modified: head/devel/json-c/Makefile Modified: head/devel/json-c/Makefile ============================================================================== --- head/devel/json-c/Makefile Wed Oct 7 21:57:49 2020 (r551671) +++ head/devel/json-c/Makefile Wed Oct 7 22:11:29 2020 (r551672) @@ -3,6 +3,7 @@ PORTNAME= json-c PORTVERSION= 0.15 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= https://s3.amazonaws.com/json-c_releases/releases/ \ LOCAL/sunpoet @@ -21,6 +22,11 @@ TEST_TARGET= test USE_LDCONFIG= yes CPE_VENDOR= json-c_project + +# Avoid use of newlocale(3) that results in increasing memory usage +post-configure: + ${REINPLACE_CMD} -e 's|.*HAVE_USELOCALE|// &|' \ + ${CONFIGURE_WRKSRC}/config.h post-install: ${INSTALL_DATA} ${WRKSRC}/json_object_private.h ${STAGEDIR}${PREFIX}/include/json-c/