Here's a test I put together to demo that the
CHANNEL_TAINT flag is improperly cleared:
test io-74.1 {improper clear of CHANNEL_TAINT} -setup {
set fn [makeFile {} io-74.1]
set rfd [open $fn r]
testobj freeallvars
interp create slave
} -constraints testobj -body {
teststringobj set 1 [string range $rfd 0 end]
read [teststringobj get 1]
testobj duplicate 1 2
interp transfer {} $rfd slave
catch {read [teststringobj get 1]}
read [teststringobj get 2]
} -cleanup {
interp delete slave
testobj freeallvars
removeFile io-74.1
} -returnCodes error -match glob -result {can not find channel named "*"}
Now it is clear to me that the answer is not a matter
of getting treatment of the flag corrected. A flag is simply
the wrong tool.
To cache the resolution of a channel name in a particular
context, we need to use the same epoch scheme we use
for other things that are records of resolutions in a context
that may vary over time.
|