Tcl Source Code

View Ticket
Login
Ticket UUID: 104f2885bb302d7bf43819e6086f49c3cb59263e
Title: channel TAINT flag is wrong tool
Type: Bug Created on: 2016-07-14 16:35:40
Submitter: dgp Assigned to: dgp
Subsystem: 25. Channel System Severity: Minor
Priority: 5 Medium Last modified: 2016-07-18 16:27:19
Status: Closed Closed by: dgp
Resolution: Fixed Closed on: 2016-07-18 16:27:19
Version: 8.5+
Description:
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.
User Comments:
dgp added on 2016-07-18 16:27:19:
Now pushing fix to all branches.