Skip to content
Tcl Source Code Artifact [f520790052]
Login

Artifact [f520790052]

Artifact f520790052df3ae19e70cf65582436e4644b5800:

Manifest of check-in [f520790052] - Docs for Tcl_CreateChannelHandler() state that the registered handler proc will be called back with a mask value. "Mask is an integer mask indicating which of the requested conditions actually exists for the channel; it will contain ***a subset of the bits from the mask argument*** to Tcl_CreateChannelHandler when the handler was created." (emhpasis added). Tcl_NotifyChannel is not honoring this. It passes a mask value that may contain bits not in common with the mask argument to T_CCH(). This commit is a one-liner patch adding in the masking step to make things behave as documented. Thanks to apn for digging this out. (In combination with other questionable code, this led to a hang in test http-4.6 on Windows) Tcl_NotifyChannel() has had this error in all of recorded Tcl history. It's hard to imagine any code dependent on it though. If any exists, it can be revised to pass the mask value it truly needs to T_CCH() and end up with code suitable both before and after this change. If you concur, please merge to core-8-5-branch, and I'll take it from there. by dgp on 2014-08-20 17:50:41.
B cefd4a6c514365b82f771c321489a57b57a36feb
C Docs\sfor\sTcl_CreateChannelHandler()\sstate\sthat\sthe\sregistered\shandler\sproc\nwill\sbe\scalled\sback\swith\sa\smask\svalue.\s"Mask\sis\san\sinteger\smask\sindicating\nwhich\sof\sthe\srequested\sconditions\sactually\sexists\sfor\sthe\schannel;\sit\swill\ncontain\s***a\ssubset\sof\sthe\sbits\sfrom\sthe\smask\sargument***\sto\nTcl_CreateChannelHandler\swhen\sthe\shandler\swas\screated."\s(emhpasis\sadded).\n\nTcl_NotifyChannel\sis\snot\shonoring\sthis.\s\sIt\spasses\sa\smask\svalue\sthat\smay\ncontain\sbits\snot\sin\scommon\swith\sthe\smask\sargument\sto\sT_CCH().\n\nThis\scommit\sis\sa\sone-liner\spatch\sadding\sin\sthe\smasking\sstep\sto\smake\sthings\nbehave\sas\sdocumented.\s\sThanks\sto\sapn\sfor\sdigging\sthis\sout.\s\s(In\scombination\nwith\sother\squestionable\scode,\sthis\sled\sto\sa\shang\sin\stest\shttp-4.6\son\sWindows)\n\nTcl_NotifyChannel()\shas\shad\sthis\serror\sin\sall\sof\srecorded\sTcl\shistory.\nIt's\shard\sto\simagine\sany\scode\sdependent\son\sit\sthough.\s\sIf\sany\sexists,\sit\ncan\sbe\srevised\sto\spass\sthe\smask\svalue\sit\struly\sneeds\sto\sT_CCH()\sand\send\sup\nwith\scode\ssuitable\sboth\sbefore\sand\safter\sthis\schange.\n\nIf\syou\sconcur,\splease\smerge\sto\score-8-5-branch,\sand\sI'll\stake\sit\sfrom\sthere.
D 2014-08-20T17:50:41.701
F generic/tclIO.c 98b40a1869df356a1616978dd038f8263ecb0ddc
F library/tzdata/SystemV/AST4 55be1faf85f0d5d5604685f9ac19286142fc7133
F library/tzdata/SystemV/AST4ADT 1bb9f75215a172b25d3ae27aaad6f1d74f837fe6
F library/tzdata/SystemV/CST6 b3a469977d38e1156b81a93d90e638693cfdbeef
F library/tzdata/SystemV/CST6CDT 00de53dc7aa97f26b1a8bf83315635fbf634abb3
F library/tzdata/SystemV/EST5 eb768ecb0b1b119560d2acbb10017a8b3dc77fdd
F library/tzdata/SystemV/EST5EDT 92f92cd64937703d4829c42fe5656c7ccba22f4e
F library/tzdata/SystemV/HST10 f4ac3abbea4a67013f4dc52a04616152c4c639a9
F library/tzdata/SystemV/MST7 eff5ce7cd0a0cbcf366ac531d168ccb2b7c46734
F library/tzdata/SystemV/MST7MDT 52513bfa267ca2e84fddf3c252a4e8fd059f2847
F library/tzdata/SystemV/PST8 4603de0753b684a8d7acb78a6164d5686542ee8e
F library/tzdata/SystemV/PST8PDT 535e0bf050e41dcfce08686afdfaff9aafef220c
F library/tzdata/SystemV/YST9 5884e6ba28fd71a944ca2ed9cb118b9e108ef7cb
F library/tzdata/SystemV/YST9YDT 0714c6ecaaf7b4d23272443e5e401ce141735e78
F win/tclsh.exe.manifest.in 7763739dd56862e23601bb15a9b02f767d689bac
P a2a1fe34e9ebd0be2d16b244990a5856ac893b07
R 172726722ec4a9ac182edbebab912aea
T *branch * aku-review
T *sym-aku-review *
T -sym-core-8-5-branch *
U dgp
Z 2317d6de3bdde176c53485bf3971e523