Skip to content
Tcl Source Code Artifact [8f2709c246]
Login

Artifact [8f2709c246]

Artifact 8f2709c2460c33ce577d8966b9253d9bbecd6c3f85fac0665a23ea788f00794e:

Ticket change [8f2709c246] - Ticket [b3977d199b08e397|b3977d199b] <i>Channel gets inserts spurious empty lines on receiving torn CR-LF</i> status still Open with 3 other changes by apnadkarni on 2022-07-03 06:42:53.
D 2022-07-03T06:42:53.264
J icomment Here\sis\smy\sanalysis\sof\swhat\sis\shappening\s(most\saction\sis\sinside\sTcl_GetObj)\r\n\r\nWhen\sa\sCR\sis\sread\sfrom\sthe\schannel\sbuffer\sbut\sthe\saccompanying\sLF\shas\snot\sarrived,\sthe\schannel\scode\spasses\sup\sthe\sline\sas\sthe\s`gets`\sresult\sand\salso\sremembers\sthat\sa\sCR\shas\sbeen\sseen\sby\s[setting\sa\sflag](https://core.tcl-lang.org/tcl/file?ci=651b1008fbc7f7ed&name=generic/tclIO.c&ln=4794)\r\n\r\nWhen\ssubsequently\sthe\sLF\sis\sreceived,\sthe\schannel\ssubsystem\scorrectly\s\r\n[skips](https://core.tcl-lang.org/tcl/file?ci=651b1008fbc7f7ed&name=generic/tclIO.c&ln=4753-4773)\sit\sby\s[bumping\sthe\spointer](https://core.tcl-lang.org/tcl/file?ci=651b1008fbc7f7ed&name=generic/tclIO.c&ln=4766)\sinto\sthe\sreceive\sbuffer\spast\sthe\sLF.\r\n\r\nHowever,\slater\sin\sthe\scode,\sthe\spointer\soffset\sis\s[reset\sto\sits\sold\svalue](https://core.tcl-lang.org/tcl/file?ci=651b1008fbc7f7ed&name=generic/tclIO.c&ln=4900)\swhich\smeans\sthe\snext\sgets\ssees\sit\sas\sa\snew\sline\sand\sin\sauto\stranslation\smode\sreturns\san\sempty\sline\sas\sa\sresult.\r\n\r\nThis\slast\sreset\sof\svalue\sis\sthe\sroot\sof\sthe\sproblem.\sI\sdo\snot\sunderstand\sall\sthe\smanipulations\sof\sthe\sbuffers\sand\soffsets\sand\swhy\sthat\sis\snecessary\sso\shesitant\sto\ssuggest\sa\sfix.
J login apnadkarni
J mimetype text/x-markdown
K b3977d199b08e3979a8da970553d5209b3042e9c
U apnadkarni
Z 88f055778ab86837e17d1a0c0e5117c1