Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1811f3a8bdf82fd4da7ad3912a2d4436fc807072
Ticket: 1790435fffffffffffffffffffffffffffffffff
Error in generic/tclVar.c TclDeleteNamespaceVars()
User & Date: msofer on 2007-09-08 03:45:01
Changes

  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"