Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3315893a568b0c906006f1a0bbc49add596722d2
Ticket: d4e7780ca1681cd095dbd81fe264feff75c988f7
"global" cmd literal sharing vs. per-interp resolvers
User & Date: gustafn2 on 2016-07-21 10:03:33
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Cmd literals are shared in the global (i.e. per-interpreter) literal pool per namespace. However, it is not guaranteed, that the cmdObj resolved for a literal via a cmd resolver is the always same for a namespace. Therefore one sees different results for a cmd depending on whether or not the a cmd literal was earlier added to the global cmd literal pool. The global shared cmd literal is taken, the result from the command resolver is ignored.
    
    The problem comes from a large real world application during the tcl8.5 -> tcl8.6 transition. The provided patch (see attachment) determines such situations and turns shared global literals into unshared private ones. The provided test cases are trying to reproduce the behavior in a minimalistic setup, which tries to minimalize interactions with other test cases by restricting to certain names.
    
    An alternative (but not so local) approach to address these kind of bugs would be to flag during cmd resolution whether a resolved command was derived from a custom cmd resolver, and to prevent the namespace based "global" sharing in such cases based on that flag.
    
  5. foundin changed to: "8.6.6"
  6. is_private changed to: "0"
  7. login: "gustafn2"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "d0ad4471e07e8c03bf0d90786ec6d31e33bcf241"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "gustafn2"
  14. subsystem changed to: "45. Parsing and Eval"
  15. title changed to:
    "global" cmd literal sharing vs. per-interp resolvers
    
  16. type changed to: "Bug"