.
D 2008-05-20T04:15:19
J assignee kennykb
J cmimetype text/plain
J comment According\sto\sthe\sstandard\sfor\sdlerror(),\sit's\snot\srequired\sto\sbe\sthread-safe.\s\s\nhttp://www.opengroup.org/onlinepubs/009695399/functions/dlerror.html\n\nI\salso\schecked\sseveral\sopen\ssource\slibc.\s\sNetBSD\sand\sOpenBSD\sdon't\suse\sthread-specific\sstorage\sfor\sdlerror\smessages,\sbut\sthe\sGNU/Linux\sglibc\sdoes.\n\nAttached\sis\sa\spatch\sto\sfix\sthe\sproblem.\s\sIt\sdrains\sthe\sdlerror()\sfirst\safter\sentering\sthe\scritical\sregion.\n\nThe\sLinux\susage\ssuggested\sis\sslightly\sdifferent\sthan\swhat\sBSD\sseems\sto\ssuggest.\s\sThe\sglibc\sdlsym\smanual\ssuggests\susing\sdlerror\sto\sindicate\sthe\ssuccess\sor\sfailure\sof\sa\sdlsym(),\srather\sthan\sNULL\sfrom\sthe\sreturn\sof\sdlsym(),\sbecause\sapparently\sdlsym()\scan\sreturn\s0/NULL\sand\sstill\shave\ssucceeded\s(with\ssome\ssymbols).\s\sSo\sthe\slogic\sshould\sprobably\sbe\schanged\sfurther\sbased\son\swhat\sthe\sglibc\sdocs\ssay.\n\nThis\sis\sthe\sexample\staken\sfrom\sthe\smanual\sfor\sdlsym:\n\sdlerror();\s\s\s\s/*\sClear\sany\sexisting\serror\s*/\n\scosine\s=\sdlsym(handle,\s"cos");\n\sif\s((error\s=\sdlerror())\s!=\sNULL)\n\s\s\s...\n\s\s\n\nI\salso\sadded\serror\shandling\sto\sTclpFindSymbol().\s\sIt\sappears\sto\sbe\sunfinished\sprior\sto\sthis,\sor\sthe\susage\sexpectations\sof\sit\shave\schanged,\sbecause\sin\sthe\sHEAD\sit\sdoesn't\suse\sthe\sinterp\sargument\sto\sreport\san\serror\slike\sthe\s(outdated?)\scomments\sstate.\n
J foundin obsolete:\s8.6a0
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter georgeps
J subsystem 40.\sDynamic\sLoading
J title tclLoadDl.c\sdlerror()\sis\snot\sthread\ssafe
J type Bug
K 1967630fffffffffffffffffffffffffffffffff
U georgeps
Z 9c79916dfdf817ec6f3069f2088957e7