Skip to content
Tcl Source Code History Of Ticket 2774581fffffffffffffffffffffffffffffffff
Login

History Of Ticket 2774581fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 2774581fffffffffffffffffffffffffffffffff

  1. Ticket change [89f7b1b06a] (rid 127311) by cnassau on 2009-04-19 16:55:51:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The following doesn't feel right:
      
          interp create other
          other eval {
              proc myforeach {var script} {
                  upvar 1 $var v
                  foreach v {1 2 3} {
                      uplevel 1 $script
                  }
              }
              set myvar myvar-remote
              myforeach stuff {
                  puts remote,$myvar,$stuff
              }
          }
          interp alias {} myforeach other myforeach
          set myvar myvar-main
          myforeach stuff {
              puts main,$myvar,$stuff
          }
      
      The output is 
      
         remote,myvar-remote,1
         remote,myvar-remote,2
         remote,myvar-remote,3
         main,myvar-remote,1
         main,myvar-remote,2
         main,myvar-remote,3
      
      Here $myvar is taken from interpreter "other" in both cases: I would have expected "main,myvar-main,1..3" in the second three lines.
      
    4. foundin initialized to: "obsolete: 8.5.7"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "cnassau"
    10. subsystem initialized to: "22. [proc] and [uplevel]"
    11. title initialized to: "cross-interp alias uplevel behaviour"
    12. type initialized to: "Bug"
  2. Ticket change [ee054cb9c0] (rid 104009) by msofer on 2009-04-20 00:27:57:

    1. closedate changed to: "2009-04-19T17:27:57"
    2. closer changed to: "msofer"
    3. icomment:
      This is an isolation/security feature, not a bug: slave interps DO NOT HAVE ACCESS to their parent's vars or commands, except when explicitly authorized. Interps are strongly isolated from each other by design.
      
      Think of what would happen if you allowed the slave to access the master's var and, say, put a trace on it. With this mechanism it could set up some kind of "trojan code" in the master.
      
      If you think that we can improve the docs to make this more explicit, please reopen the bug with your suggestions.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Rejected"
    7. status changed to: "Closed"
    8. username: "msofer"