Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c11ea498475ca907266ec0896f183d9dcd72d606
Ticket: 2939073fffffffffffffffffffffffffffffffff
Unset PATTERN unsafe with trace-originated secondary unsets
User & Date: ferrieux on 2010-02-01 06:27:50
Changes

  1. icomment:
    Sigh.
     Just produced a bucket of depth three: [array set x  {a 1 e 1 i 1}].
    (verify with [array stat x])
    
    Then tried this:
         trace add variable x unset rem
         proc rem args {puts REM:$args; if {![info exists ::again]} {set ::again 1;unset ::x(e)}}
    
    Then [array unset x *] should remove, in order, i,e,a.
    *But*, since the trace proc removes e while removing i, the outer loop should get into trouble....
    
    Though it doesn't for some reason.
    Just noticed the tricky game of Undefining a var instead of coldly killing its hash entry. Maybe this explains that, and my hypothesis was naive. Something more subtle must come into play...
    
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"