Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a5c285ab0d5bc1e03a458148e51c6bdf5c580acc
Ticket: 1590232fffffffffffffffffffffffffffffffff
error in cmd traces & aliases
User & Date: msofer on 2006-11-03 23:14:19
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Aliases resolve command names in the global namespace,
    but execute in the caller's scope. In the presence of
    traces that cause a second resolution, the second time
    the resolution proceeds in caller scope instead of global:
    
    mig@ice:~$ cat /tmp/trace
    set res {}
    proc x {} {return ::}
    namespace eval a {}
    proc a::x {} {return ::a}
    interp alias {} y {} x
    lappend res [namespace eval a y]
    trace add execution x enter {
          rename ::x {}
          proc ::x {} {return ::}
          #}
    lappend res [namespace eval a y]
    
    puts $res
    mig@ice:~$ /home/CVS/tcl8.5a5/unix/tclsh /tmp/trace
    :: ::a
    
    Correct behaviour is restored with the attached patch,
    returning
    :: ::
    
  4. foundin changed to: "obsolete: 8.5a6"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "msofer"
  10. subsystem changed to: "45. Parsing and Eval"
  11. title changed to: "error in cmd traces & aliases"
  12. type changed to: "Bug"