Skip to content
Tcl Source Code Artifact [79731ca478]
Login

Artifact [79731ca478]

Artifact 79731ca4787f003f4deee643b53c3e35cfa64b80a06eb51a8948e3b12a6cfb3c:

Ticket change [79731ca478] - New ticket [75d525d37c931812|75d525d37c] <i>Memory corruption transferring server (listening) sockets between threads</i>. by apnadkarni on 2020-01-31 12:23:59.
D 2020-01-31T12:23:59.693
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment Working\son\sa\sgeneric\sIOCP\sframework\sfor\sWindows,\sI\snoticed\sthe\sfollowing\sissue\swhile\strying\sto\sgrok\sthe\sWindows\ssocket\scode.\sNote\sit\sappears\sthe\ssame\sissue\swill\salso\sexist\son\sUnix.\r\n\r\nThe\ssocket\simplementation\sstores\sthe\suser\ssupplied\sscript\sargument\sto\s[socket\s-server]\sin\sthe\sAcceptCallback\sstructure\salong\swith\sa\spointer\sto\sthe\scurrent\sinterp.\sIf\sthe\ssocket\sis\sthen\stransferred\sto\sa\sdifferent\sthread\susing\sthread::transfer,\swhen\sa\sconnection\scomes\sin\sthe\scallback\sis\srun\sin\sthe\scontext\sof\sthe\sowning\sthread\sbut\susing\sthe\soriginal\sinterp\sbelonging\sto\sthe\soriginal\sthread\swith\sobviously\scatastrophic\sresults.\r\n\r\nThere\sneeds\sto\sbe\smechanism\sto\seither\sswitch\sthe\sinterp\sstored\sin\sthe\sAcceptCallback\sstructure\sto\sthe\sappropriate\sone\sin\sthe\sreceiving\sthread\s(this\sseems\shard\sto\sme\sgiven\sthe\scurrent\simplementation),\sor\sdisallow\stransfer\sof\sserver\ssockets.\r\n\r\nI'll\stry\sto\sprovide\sa\sproof\sscript\slater.
J foundin 8.6.10
J is_private 0
J login apnadkarni
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter apnadkarni
J subsystem 25.\sChannel\sSystem
J title Memory\scorruption\stransferring\sserver\s(listening)\ssockets\sbetween\sthreads
J type Bug
K 75d525d37c931812e9b00a80f6f43ac062598d54
U apnadkarni
Z 90a56b709647f85268edaba96cd1b2bd