.
D 2004-07-09T13:51:30
J assignee andreas_kupries
J cmimetype text/plain
J comment Tcl\sversion\s-\scurrent\sand\sall\sinspected\s-\sseems\sto\nbe\sa\sproblem\sall\sthe\sway\sback\sto\sintroduction\sof\ntclWinThrd.c\sso\sall\sv8.0\sonwards\n\nOS\s-\sWindows\sonly\sproblem,\sand\sonly\sif\sTcl\sinterpreters\nare\snot\screated\s(ie\susing\stcl\sas\sa\sC\slibrary)\n\nWhen\sTcl\sis\sused\sas\sa\slibrary\s(e.g.\sfor\sutf-8\sor\sregexp\nfunctions)\son\sthe\sWindows\splatform\sand\sTCL_THREADS\nis\sdefined\sduring\sthe\sbuild\sof\sTcl,\sthe\sfunctions\swill\nproduce\sa\sseg\sfault\swhen\sthe\s\nMASTER_LOCK\nmacro\sis\sinvoked\sbecause\sthe\smasterLock\svariable\shas\nnot\sbeen\sinitialized.\s\sThis\sis\snot\sseen\sif\sTcl_CreateInterp\nhas\sbeen\sinvoked\sbecause\sTclpInitLock\sis\scalled\nby\sTclInitSubsystems.\n\nHowever,\sthe\sTcl_RegExpCompile,\sfor\sexample\sis\s\nsupposed\sto\sbe\scallable\swith\sthe\sTcl_Interp\sparameter\nset\sto\sNULL\s(0).\n\nIn\sthe\sunix\simplementation,\sthe\scorresponding\svariable\nis\sinitialized\sat\scompile\stime\sthrough\sa\sstatic\sinitializer\nstatic\spthread_mutex_t\smasterLock\s=\s\nPTHREAD_MUTEX_INITIALIZER;\nthis\scannot\sbe\sdone\son\swindows\sbecause\sa\scall\nto\sInitializeCriticalSection\sis\srequired.\n\nOne\spossible\sfix\sis\schange\sthe\smacro\sfor\sMASTER_LOCK\nto\scall\sthe\sTclpMasterLock\sfunction\sin\stclWinThrd.c\nThis\sseems\sreasonable\sand\sit\sonly\saffects\sthis\sone\sfile.\n\nIn\sthe\smeantime,\sit\sappears\sthat\sa\scall\sto\sTcl_GetTime\nwill\sinitialize\sthe\smasterLock\smutex.\n
J foundin obsolete:\s8.5a1
J priority 5\sMedium
J resolution None
J status Open
J submitter sorensenjs
J subsystem 49.\sThreading
J title CRITICAL_SECTION\smasterLock\snot\sinitialized
J type Bug
K 987967ffffffffffffffffffffffffffffffffff
U sorensenjs
Z 73da2cc7529b4fa569c76465ba6d3cb7