.
D 2018-02-20T14:58:38.420
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment Tcl\sitself\sdoes\snot\sexpose\sthread\sIDs\sto\sscripts.\r\n\r\nThe\sThread\spackage\sdoes,\sand\sdoes\sso\svia\sa\sformatted\sstring\srepresentation\r\n\r\n\s\s\s\stid0xHHHH...\r\n\r\nwhere\sthe\sHHHH\sis\sa\shex\sencoding\sof\sa\spointer\svalue.\r\n\r\nTcl\sdoes\shave\ssome\stesting\scommands\sthat\sexpose\sthread\sIDs\sas\r\nTcl\svalues:\r\n\r\n\s\s\s\stestmainthread,\stestchannel\smthread,\stestthread\screate,\stestthread\sid\r\n\r\n(some\sother\stesting\scommands\saccept\sthese\svalues\sas\sarguments)\r\n\r\nThese\stesting\scommands\sdo\snot\suse\sthe\ssame\svalue\sencoding\sthat\sthe\r\nThread\spackage\sdoes.\r\n\r\nWorse,\sthey\sdo\snot\seven\suse\sa\sfully\sconsistent\sencoding\samong\sthemselves.\r\nSome\sreport\sthe\spointer\svalue\sas\sa\ssigned\slong,\sothers\sas\sa\ssigned\swide,\r\nusing\sdecimal\srepresentation\sin\sboth\scases.\r\n\r\nThe\sdifference\sshows\sup\sonly\son\splatforms\swhere\slong\sand\swide\sare\sdifferent,\r\ntypically\s32-bit\ssystems.\s\sRecent\sadoption\sof\sTIP\s484\sin\s8.7a2\shas\r\nexposed\sthe\sproblem\sas\stesting\sfailures.\s\r\n\r\nIn\sparticular,\stest\schan-io-59.1\sreports\sfailure\sbecause\sthe\ssigned\slong\r\nrepresentation\sof\sa\sthread\sID\spointer\sreturned\sby\s[testmainthread]\sis\r\nnot\sequal\sto\sthe\ssigned\swide\srepresentation\s(new\swith\sTIP\s484!)\sof\r\nthe\ssame\sthread\sID\spointer\sreturned\sby\s[testchannel\smthread].\r\n\r\nI\sthink\sthe\sbest\sfix\sis\sto\ssettle\son\sthe\scommon\ssigned\swide\srep\r\nof\s[testthread\sid]\sand\sget\sthem\sall\sconsistent.\r\n\r\nA\srelated\sissue\sis\sto\snote\sthat\sTclFormatInt()\shas\sincompatibly\r\nchanged\sits\sfunction\s(It\sused\sto\sformat\sthe\sstring\srep\sof\sa\ssigned\r\nlong\svalue\s--\snow\sit\sdoes\sa\ssigned\swide\svalue\s)\sand\sall\scallers\sneed\r\nto\sbe\schecked\sthat\sthey\sare\sok\swith\sthat.
J foundin 8.5+
J is_private 0
J login dgp
J priority 5\sMedium
J resolution None
J severity Important
J status Open
J submitter dgp
J subsystem 49.\sThreading
J title inconsistent\sthread\sid\svalues\sin\stesting\scommands
J type Bug
K 89dfecb6b7468953b2563eb6034d6a087388770e
U dgp
Z c9b4420fb546c8e1d670879b6590a535