Date: Tue, 2 Dec 2003 23:59:48 +0200 (EET) From: Margo <margo@Forest.Od.UA> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/59910: memory leak in setlocale routine Message-ID: <Pine.BSF.4.40.0312022357480.12087-100000@Rainbow.Deep.Forest> Resent-Message-ID: <200312022210.hB2MAF02081989@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 59910
>Category: misc
>Synopsis: memory leak in setlocale routine
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 02 14:10:12 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: rufina
>Release: FreeBSD 4.8-STABLE i386
>Organization:
DreamLand development team.
>Environment:
System: FreeBSD dl.kiev.ua 4.8-STABLE FreeBSD 4.8-STABLE #1: Mon Aug 11 21:26:49
EEST 2003 bor@hl.uo.net.ua:/usr/obj/usr/src/sys/HALFLIFE i386
>Description:
There was a commit in the main trunk:
----
date: 2003/06/13 00:14:07; author: jkh; state: Exp; lines: +6 -6
Fixes to locale code to properly use indirect pointers in order to prevent
memory leaks (fixes bugs earlier purported to be fixed).
Submitted by: Ed Moy <emoy@apple.com>
Obtained from: Apple Computer, Inc.
MFC after: 2 weeks
----
RELENG_4 is still waiting for MFC.
This is important, since STL depends on correct locale switching.
Each int-to-string STL conversion issues two setlocale calls.
>How-To-Repeat:
#include <locale.h>
int
main()
{
for(;;) {
setlocale(LC_ALL, "ru_RU.KOI8-R");
setlocale(LC_ALL, "C");
}
}
>Fix:
upgrade to current?
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.40.0312022357480.12087-100000>
