Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4bf0aa4a28bfe14aa27bf3edd6aa36aed412cd66
Ticket: bc1a96407a7f73024c2238a747b428ec1145ae19
segfault in compiled [array set] of array-traced variable
User & Date: dgp on 2014-09-09 10:18:02
Changes

  1. icomment:
    The problem is that a traced variable has no name.
    
        upvar 0 ::a <noname>
    
    Using the actual upvar command that doesn't happen
    and all is ok:
    
    % proc report {a e o} {                       
        set msg "$o on $a"
        if {$e ne {}} {append msg ($e)}
        puts $msg
    }
    % proc foo {} {
        upvar 0 ::tcl_platform x
        trace add variable x array report
        array set ::tcl_platform {mmmm donuts}
        array set x {where coffee}
    }
    % foo
    array on ::tcl_platform
    array on x
    
  2. login: "dgp"
  3. mimetype: "text/plain"