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

History Of Ticket 1790435fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1790435fffffffffffffffffffffffffffffffff

  1. Ticket change [5831308b61] (rid 117762) by nobody on 2007-09-07 20:30:38:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      There is an error in the TclDeleteNamespaceVars() subroutine for version 8.4.14.  At line 4618:
      
               hPtr = Tcl_FirstHashEntry(tablePtr, &search)) {   
      
      should be changed to
      
               hPtr = Tcl_NextHashEntry(&search)) {
      
      
        otherwise an infinite loop occurs.
      
    4. foundin initialized to: "obsolete: 8.4.14"
    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: "nobody"
    10. subsystem initialized to: "07. Variables"
    11. title initialized to: "Error in generic/tclVar.c TclDeleteNamespaceVars()"
    12. type initialized to: "Bug"
  2. Ticket change [1811f3a8bd] (rid 122605) by msofer on 2007-09-08 03:45:01:

    1. closedate changed to: "2007-09-07T20:45:01"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Not an error, per design.
      
      First, no infinite loop: each time you go through the body one variable is deleted from the table by Tcl_DeleteHashEntry, so (assuming no new variables are created) eventually there are none left.
      
      Second, per design: delete traces on variables may create or delete other variables. By starting the search anew with Tcl_FirstHashEntry you insure that (a) you always get a valid hPtr (as opposed to one that was deleted from under your feet), and (b) no new hPtr appeared behind your back (at a part of the hashtable that you thought you were done visiting).
      
      This is implemented correctly, but is indeed problematic and can lead to infinite loops (every deleted variable creates another one via a trace): see bug #1740700
      
      The precise semantics and event ordering on namespace deletion requires revisiting.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "msofer"