Date: Wed, 7 Oct 2020 22:11:30 +0000 (UTC) From: Craig Leres <leres@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r551672 - head/devel/json-c Message-ID: <202010072211.097MBUUF016668@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010072211.097MBUUF016668>