.
D 2014-10-10T16:31:23.105
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment Tcl_Write()\sas\sreleased\sin\sTcl\s8.5.16\sand\s8.6.2\sno\r\nlonger\scompatibly\sreturns\sthe\ssame\svalues\sit\sdid\sin\r\nprior\sreleases.\r\n\r\nTcl_Write(chan,\sbuf,\stoWrite)\sdoes\snot\shave\sits\r\nreturn\svalue\sclearly\sdocumented.\s\sIt\sis\sonly\sdescribed\r\nas\s"similar\sto\sTcl_WriteChars".\r\n\r\nIn\sthe\scode\scomments\sheading\sthe\sTcl_Write\simplementation\r\nit\sis\sclaimed\sthat\sthe\sreturn\svalue\sis\s"number\sof\sbytes\r\nwritten\sor\s-1\sin\scase\sof\serror".\s\sBut\sthis\sis\sambiguous.\r\nDoes\sthat\smean\sthe\snumber\sof\sbytes\staken\sout\sof\s"buf"\r\n(some\svalue\s<=\stoWrite)?\s\sOr\sdoes\sit\smean\sthe\snumber\sof\r\nbytes\ssent\sout\sto\sthe\schannel\soutput\sdriver?\s\sIf\swe\stake\r\nour\sclue\sfrom\sthe\s"similar\sto\sTcl_WriteChars"\slanguage,\r\nwe\smight\sassume\sthat,\slike\severy\sother\sTcl_Write*\sroutine,\r\nwhat\sgets\sreported\sis\sthe\snumber\sof\sbytes\ssent\sout\sto\sthe\r\ndriver.\s\sSince\sthe\sonly\sway\sTcl_Write\scould\sconsume\sless\r\nthan\s"toWrite"\sbytes\sfrom\s"buf"\swould\sbe\sin\scase\sof\san\serror,\r\nand\swe\shave\sthe\sspecial\svalue\s-1\sto\ssignal\serrors,\sit's\r\nnatural\sto\sassume\sthat\sTcl_Write\s()\swould\snot\sbe\sreturning\r\nthe\snumber\sof\sbytes\staken\sfrom\s"buf"\sbecause\sin\sthe\sabsence\r\nof\san\serror\sthat\swould\salways\sjust\sbe\san\secho\sback\sof\sthe\r\n"toWrite"\svalue,\sand\suseless.\r\n\r\nBut\syou'd\sbe\smaking\sassumptions\scontrary\sto\sthe\scode\shistory.\r\nIn\sfact,\sup\suntil\snow,\sTcl_Write()\shas\sindeed\sbeen\sechoing\r\nback\sthe\s"toWrite"\svalue\son\ssuccess.\s\sThe\srefactoring\swork\son\r\nchannels\sincompatibly\schanged\sthat\sto\sreporting\sthe\snumber\sof\r\nbytes\swritten,\sand\son\sWindows\sby\sdefault,\sand\sanywhere\swith\r\n-translation\scrlf\sactive,\sthat\scan\sbe\san\sincompatible\sdifference.\r\n\r\nAs\syou\smight\sguess,\sthis\sis\sdamaging\sa\sdeployed\sapplication\sof\r\nmine.\s\sAs\ssoon\sas\sfolks\supgrade\sto\sActiveTcl\s8.6.2.0,\stheir\r\nprograms\sstop\sworking.\s\sThat's\swhat's\sreported.\s\sIt's\sclear\r\nthe\ssame\sissue\swill\splague\sthose\sworking\swith\sdeployed\sprograms\r\nusing\stcl85.dll\sfrom\sActiveTcl\s8.5.16.0.
J foundin 8.5.16
J is_private 0
J login dgp
J priority 5\sMedium
J resolution None
J severity Critical
J status Open
J submitter dgp
J subsystem 25.\sChannel\sSystem
J title Tcl_Write()\sbreaks\sinterface\sin\s8.5.16\sand\s8.6.2
J type Bug
K bf7135428c3086e7704e2ccddf8c3066eb7fc36c
U dgp
Z 0d3a32383e41a19348270abc2c862b21