HomeFreeBSD

devel/json-c: Avoid use of newlocale(3) that results in increasing memory usage

Description

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)

Details

Provenance
leresAuthored on
Parents
rP551671: Update to the 20201003 snapshot of GCC 10.2.1.
Branches
Unknown
Tags
Unknown