Skip to content
Tcl Source Code History Of Ticket ba7491332a
Login

History Of Ticket ba7491332a

Artifacts Associated With Ticket ba7491332a

  1. Ticket change [6d0ad0c188] (rid 195654) by christian.nassau on 2021-09-21 08:33:23:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      The itcl initialization code has room for improvement.
      
      The worst problem is that it is very easy to trigger a Tcl panic by trying to load the Itcl package: it suffices to create the itcl namespace beforehand. This code is also reached from Itcl_SafeInit so it can even be used to crash Tcl from a safe interpreter:
      
        /$ bin/tclsh8.6
        % namespace eval itcl { set some variable }
        variable
        % package req itcl
        Itcl: cannot create namespace: "::itcl"
        
        Aborted (core dumped)
      
      A second point is that it seems unnecessarily difficult to get the location of the "itcl.tcl" initialization file right.  I believe the "itcl.tcl" should reside next to the library that needs it, so its location could (= should) be set in the pkgIndex.tcl file, using e.g.
      
        package ifneeded itcl 4.2.1 "[list set ::env(ITCL_LIBRARY) $dir];[list load [file join $dir "libitcl4.2.1.so"] Itcl]"
      
    5. foundin initialized to: "Itcl 4.2.1"
    6. is_private initialized to: "0"
    7. login: "christian.nassau"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "3b279cda57135cd36d2c32c66396637342913651"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "christian.nassau"
    14. subsystem initialized to: "81. Bundled Packages"
    15. title initialized to: "Tcl_Panic from Itcl_SafeInit"
    16. type initialized to: "Bug"