Overview
| Artifact ID: | cd50c2240904078c63510d0bd86d3e4cc7236ee8 |
|---|---|
| Ticket: | 2662380fffffffffffffffffffffffffffffffff
Bug in append |
| User & Date: | a3a3el on 2009-03-04 17:01:47 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- 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. - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "a3a3el"
- subsystem changed to: ""
- title changed to: "Bug in append"
- type changed to: "Bug"