﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
185	libc: Calling setlocale() from both parent and forked child crashes child	Yuri Dario	bird	"When setlocale( LC_ALL,"""") is called in main program and also in the child forked process, the child crashes in UCONV.DLL

Sample testcase


{{{

#include <locale.h>

int local( char* who)
{
printf(""%s set locale\n"", who);
setlocale( LC_ALL, """");
printf(""%s set locale done\n"", who);
}

int main( void)
{
int pid;
local(""parent"");
pid = fork();
if (pid==0)
  local(""child"");
}

}}}

gives the following output

{{{
[e:\rd\libc\test\setlocale]local.exe
parent set locale
parent set locale done
child set locale

Killed by SIGSEGV
pid=0x028f ppid=0x028e tid=0x0001 slot=0x00d1 pri=0x0200 mc=0x0001
E:\RD\LIBC\TEST\SETLOCALE\LOCAL.EXE
UCONV 0:00002eb0
cs:eip=005b:1fc82eb0      ss:esp=0053:0012f18c      ebp=0012f1b8
 ds=0053      es=0053      fs=150b      gs=0000     efl=00010206
eax=02500330 ebx=02500330 ecx=00000000 edx=00506220 edi=00000001 esi=0012f23c
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
}}}

"	defect	closed	normal	libc-0.6.4	libc	0.6.2	normal	fixed	setlocale fork crash uconv	
