Date: Wed, 31 Jul 2019 07:39:37 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 239520] Possible memory leak in newlocale/uselocale Message-ID: <bug-239520-227-1VIzVyVWSu@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-239520-227@https.bugs.freebsd.org/bugzilla/> References: <bug-239520-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239520 Baggio Kwok <rootkwok@cpan.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rootkwok@cpan.org --- Comment #1 from Baggio Kwok <rootkwok@cpan.org> --- Looks like the following atomic operation is not working as expected when manipulating the reference count. /usr/src/lib/libc/locale/xlocale_private.h:183 177 __attribute__((unused)) static void 178 xlocale_release(void *val) 179 { 180 struct xlocale_refcounted *obj =3D val; 181 long count; 182=20 183 count =3D atomic_fetchadd_long(&(obj->retain_count), -1) - 1; 184 if (count < 0 && obj->destructor !=3D NULL) 185 obj->destructor(obj); 186 } --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239520-227-1VIzVyVWSu>