Skip to content
Tcl Source Code Artifact [0ae3cc285e]
Login

Artifact [0ae3cc285e]

Artifact 0ae3cc285e7e9026591d265c29ec38ac4a9a725ce48d208a3ea3c1766c26c4a3:

Ticket change [0ae3cc285e] - Ticket [c4eb46a196227040|c4eb46a196] <i>gets blocks on encoding error in non blocking mode</i> status still Open with 4 other changes by oehhar on 2023-11-12 19:38:27.
D 2023-11-12T19:38:27.009
J icomment A\sdebugging\ssession\sshowed\san\sendless\sloop\sin\stclIO.c.\r\nThe\swihile-loop\sin\sline\s4750\swas\snever\sexited.\r\n\r\nThe\sexit-point\sof\sthe\sblocking\scase\swas\sexplicitly\sexcempted\sfor\sthe\snon\sblocking\scase.\sLine\s4920\sreads:\r\n\r\n<verbatim>\r\n\t}\selse\sif\s(gs.bytesWrote\s==\s0\r\n\t\t&&\sGotFlag(statePtr,\sCHANNEL_ENCODING_ERROR)\r\n\t\t&&\s!GotFlag(statePtr,\sCHANNEL_NONBLOCKING))\s{\r\n\t\s\s\s\s/*\sSet\seol\sto\sthe\sposition\sthat\scaused\sthe\sencoding\serror,\sand\sthen\r\n\t\s\s\s\s\s*\scontinue\sto\sgotEOL,\swhich\sstores\sthe\sdata\sthat\swas\sdecoded\r\n\t\s\s\s\s\s*\swithout\serror\sto\sobjPtr.\s\sThis\sallows\sthe\scaller\sto\sdo\ssomething\r\n\t\s\s\s\s\s*\suseful\swith\sthe\sdata\sdecoded\sso\sfar,\sand\salso\sresults\sin\sthe\r\n\t\s\s\s\s\s*\sposition\sof\sthe\sfile\sbeing\sthe\sfirst\sbyte\sthat\swas\snot\r\n\t\s\s\s\s\s*\ssuccessfully\sdecoded,\sallowing\sfurther\sprocessing\sat\sexactly\sthat\r\n\t\s\s\s\s\s*\spoint,\sif\sdesired.\r\n\t\s\s\s\s\s*/\r\n\t\s\s\s\seol\s=\sdstEnd;\r\n\t\s\s\s\sgoto\sgotEOL;\r\n\t}\r\n</verbatim>\r\n\r\nRemoving\sthe\scondition\sfor\sNONBLOCKING\scures\sthe\sendless\sloop.\r\n\r\nCommit\s[831c9a8797]\sin\sbranch\sbug-c4eb46a1\simplements\sthis\swith\san\sadded\stest.\r\n\r\nThis\sis\ssuccessful\sfor\sthe\serror\ssequence\s"A_195_B"\s(as\sdescribed\sabove).\r\nUnfortunately,\sit\sis\snot\ssuccessful\sfor\sthe\serror\ssequence\s"A\\x81",\swhat\sis\sused\sin\sthe\soriginal\stest\sio-75.6.\sIn\sthis\scase,\sthe\sgets\sreturns\ssuccessfully\swithout\serror\smessage.\r\n\r\nSo,\stwo\stests\swere\sadded\sfor\sboth\scases\s(io76.6.1\sand\sio-76.6.2)\swith\scommit\s[90ac5ff8f7].
J login oehhar
J mimetype text/x-fossil-wiki
J username oehhar
K c4eb46a196227040bfb18770ac261d6836e58f0e
U oehhar
Z 451dde964a6d7959feadbac8ea46f347