Skip to content
Tcl Source Code Artifact [d944efc379]
Login

Artifact [d944efc379]

Artifact d944efc37925f36d116cc975484a3038e941e87d:

Ticket change [d944efc379] - Ticket [1945538fffffffff|1945538fff] <i>Stalling async reads and empty reads with package TLS</i> status still Open with 4 other changes by ferrieux on 2011-11-11 20:44:25.
D 2011-11-11T20:44:25
J icomment Hm,\sit\sjust\soccurred\sto\sme\sthat\s"false\spositive"\sreadable\sfileevents\sare\sunavoidable\sas\ssoon\sas\sa\sthe\stwo\sfollowing\sconditions\shold:\n\s\s\s(a)\sthe\stransmission\sunit\sis\s>=2\sbytes\n\s\s\s(b)\sno\sread-ahead\sis\sdone\sin\sthe\snotifier\s\n\nAs\san\sexample,\sthe\svery\ssame\ssituation\slets\san\sutf-8-encoded\schannel\sgenerate\sthe\ssame\sfalse\spositives\sin\svanilla\sTcl.\s\n\nTo\ssolve\sit,\ssince\s(a)\sis\sa\sgiven\sfor\sboth\sutf-8\sand\sTLS,\sthere\sare\stwo\soptions:\n\n\s(1)\sattack\s(b)\sby\sletting\sthe\snotifier\sdo\sa\s(nonblocking)\s1-unit\sread-ahead\s(into\sthe\sexisting\sinput\sbuffer)\swhen\striggered\sby\sa\slow-level\sreadable\sfileevent,\sand\spassing\sit\sto\sthe\supper\slayer\sonly\swhen\sthe\sunit\sis\scomplete.\n\n\s(2)\sdecide\sthat\sthis\sis\sa\sFact\sOf\sLife\sand\swarn\sall\sdevelopers\sthat\sa\sfileevent\sreadable\sdoes\s*not*\sguarantee\san\simmediate\sreturn\sof\s[read\s1].\sLook\sinto\sthe\ssource\sof\sTLS\swhere\sthis\sassumption\sis\smade.\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 1945538fffffffffffffffffffffffffffffffff
U ferrieux
Z 6b5217c9d9515eed3ceb76784af50264