Skip to content
Tcl Source Code Artifact [36cec2fa9e]
Login

Artifact [36cec2fa9e]

Artifact 36cec2fa9e92cb937b8ef91787397f7c99ec6b47e2fd3fc4eb58c313802e8ce5:

Ticket change [36cec2fa9e] - Ticket [b1b2d135818b64c1|b1b2d13581] <i>Tcl_Eval causes SIGSEGV, Segmentation fault</i> status still Open with 4 other changes by sebres on 2018-01-09 18:04:57.
D 2018-01-09T18:04:57.611
J icomment Do\syou\sconsider\sthe\spre-requirements\sof\smulti-threaded\stcl-execution?\r\n\r\n-\sbe\ssure\syou\suse\sthreaded-tcl\scompiled;\r\n-\sTcl_Obj's\sare\snot\sshared\sover\sthreads\s(belong\sonly\sone\sthread\sat\sthe\ssame\stime);\r\nTcl\sdoes\snot\shave\sGIL\s(e.\sg.\sin\sopposite\sto\spython),\sso\syou\sshould\stransfer\sthe\s"ownership"\sof\san\sobject\sto\scalling\sthread\s(it\sis\snot\susable\sin\ssource\sthread)\sor\suse\sTcl_DuplicateObj\sof\sit\sbefore\ssubmitting\sto\sanother\sthread;\r\n-\sif\syou've\sown\scomplex\sTcl_ObjType,\syou\sshould\screate\ssafe\sduplicate\smechanism\sfor\sit's\sduplication;\r\n-\sexecution\sof\sTcl_EvalObjEx\scan\srelease\sa\stcl-object,\sif\sits\srefCount\sequal\s0\sbefore\sexecution\s(always\suse\sTcl_IncrRefCount\sbefore\scall\sit),\sso\sif\syou\sdo\sTcl_DecrRefCount\shereafter,\syou\scan\smistakenly\sfree\sanother\sobject\sthat\syou\sdon't\sown;\r\n-\sif\syou\shave\ssome\sreferences\sin\sthe\sTcl_Obj's\sto\sseveral\sinterpreter's\s(e.\sg.\seach\sthread\shave\smore\sas\sone\sinterpreter),\syou\sshould\sbe\sin\sthe\scontext\sof\sthis\sinterpreter\sby\sthe\sexecution\s(and\sit\sis\spreserved\sas\slong\sas\sexecution\stakes\splace);\r\n-\sdon't\suse\sobjects\sof\snot\sthread-safe\smodules\s(like\s"tk")\sacross\smultiple\sthreads;\r\n-\syou\sare\sbasically\sfamiliar\swith\smulti-threaded\sdevelopment\s(synchronization\sprimitives,\setc.);\r\n\r\nIntrinsically\sTcl_ThreadQueueEvent()\sworks\sfine\sand\sis's\sa\spart\sof\smany\sinternal\smechanisms\sof\sTcl\s(notifier,\sIO,\sreflected\schannels,\setc.).\s\r\nAdditionally\sit\sworks\sfine\sin\stclthread-module\s(but\se.\sg.\salso\sin\sseveral\sother\smodules\sof\sme),\sso\sI\sdon't\sthink\sit\shas\sany\sbug.\r\n\r\nI\sbelieve\syou\sdo\spossibly\ssomething\swrong\sin\syour\scode.\r\nIt\swould\sbe\snice\sto\shave\sthe\scall-stack\son\sthe\sexception,\sto\sdo\sanalyze\swhat\sis\swrong\sthere.\r\nWithout\sit,\sit's\salmost\simpossible\sto\sfind\ssomething...
J login sebres
J mimetype text/plain
J resolution Invalid
K b1b2d135818b64c11817013ea8828b298b08a079
U sebres
Z dd87cccac035916a30643f047c79bf46