Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cd50c2240904078c63510d0bd86d3e4cc7236ee8
Ticket: 2662380fffffffffffffffffffffffffffffffff
Bug in append
User & Date: a3a3el on 2009-03-04 17:01:47
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The following can crash 8.4, 8.5 and 8.6:
    
      array set a [list]
    
      trace variable a w unset_key
    
      proc unset_key { var key op } {
    
        puts stderr "$var, $key, $op"
    
        global a
    
        if { [info exists a($key)] } {
          puts stderr "Unsetting a($key)."
          unset a($key)
        } else {
          puts stderr "Cannot unset a($key)."
        }
    
      }
    
      append a(test) one two
    
    Since 8.4, Tcl_AppendObjCmd has stopped calling Tcl_ObjSetVar2, and calls
    TclPtrSetVar instead.  However, although TclPtrSetVar returns iPtr->emptyObj if
    the variable has been unset by a trace, Tcl_AppendObjCmd is still checking for
    NULL, and so attempts to append the next argument.  I've attached patches for
    the 8.4 and 8.5 branches, and the trunk.
    
    Az.
    
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "a3a3el"
  10. subsystem changed to: ""
  11. title changed to: "Bug in append"
  12. type changed to: "Bug"