Artifacts Associated With Ticket 449893ffffffffff
Ticket change [b9a0b02fe2] (rid 129177) by msofer on 2001-08-10 19:17:05:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This shouldn't core-dump! % info patch 8.4a4 % set x(bar) 0 0 % trace variable x r {set x(foo) 1 ;#} % trace variable x r {unset -nocomplain x(bar) ;#} % trace vinfo x {r {unset -nocomplain x(bar) ;#}} {r {set x(foo) 1 ;#}} % array get x ": no such element in array % array get x Segmentation fault (core dumped) - foundin initialized to: "None"
- priority initialized to: "8"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "07. Variables"
- title initialized to: "traces on array misbehaving"
- type initialized to: "Bug"
Ticket change [fa96b05e07] (rid 91901) by msofer on 2001-08-11 02:23:22:
- icomment:
Logged In: YES user_id=148712 Bug is also present in 8.3.3 and 8.0.5.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [92d8fc46fa] (rid 105712) by dgp on 2001-08-11 02:37:36:
- icomment:
Logged In: YES user_id=80530 Note, a very similar script causes a segfault in Tcl 8.3.3. (Change [unset -nocomplain ...] to [catch {unset ... ) - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [9d5fe46d3d] (rid 96295) by msofer on 2001-12-02 07:39:39:
- icomment:
File Added - 14049: arrayGet.patch Logged In: YES user_id=148712 It is difficult to define what the correct behaviour of [array get] should be when there are read traces that modify the array structure. In discussions on the Tcl'ers Chat with Kevin Kenny and Don Porter we agreed that a (the only ?) reasonable behaviour is given by proc array-get { aName } { set result [list] upvar 1 $aName array foreach s [array names array] { if { [info exists array($s)] } { # because a trace could have deleted it lappend result $s $array($s) } } return $result } The enclosed patch implements this behaviour and adds three tests for it. These tests cause illegal memory behaviour without the patch to tclVar.c - an access to a previously disposed Tcl_Obj is detected by TCL_MEM_DEBUG. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "arrayGet.patch" [c2b66783f6] (rid 111528) by msofer on 2001-12-02 07:39:39.
Ticket change [709dbaac02] (rid 100514) by msofer on 2001-12-06 03:45:09:
- closedate changed to: "2001-12-05T20:45:09"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Patch committed to HEAD.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"
Ticket change [60d27c49e9] (rid 92138) by dgp on 2001-12-06 04:24:59:
- closedate changed to: "2001-12-05T21:24:59"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 the patch included no doc changes. Is there a best place to document the particular behavior? In the [array get] docs, perhaps?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [137b66bfa4] (rid 124226) by msofer on 2001-12-06 04:39:02:
- icomment:
Logged In: YES user_id=148712 Re docs: or with [trace]? Or both? It is a really something that is relevant to the interplay between [array get] and [trace] - when there are read traces on an array that either add or remove an element of the array. I'm also not 100% happy with the error message when the trace unsets the whole array (see test trace-1.13 ): should it rather return {} and no error as does [array get nonExistingArray] ? Reopening the ticket, with lower priority now that the segfault is gone ... - login: "msofer"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- status changed to: "Open"
- username: "msofer"
- icomment:
Ticket change [7b48ba606c] (rid 90494) by dkf on 2003-06-26 17:31:21:
- subsystem changed to: "46. Traces"
Ticket change [2dcef535d7] (rid 119123) by dgp on 2003-06-26 22:47:07:
- assignee changed to: "dgp"
Ticket change [470497dadd] (rid 99615) by dgp on 2003-10-03 06:23:38:
- priority changed to: "8"
Ticket change [72110bf735] (rid 100794) by dgp on 2003-10-07 22:20:40:
- priority changed to: "5 Medium"
Ticket change [16e88ccea9] (rid 124794) by dgp on 2003-10-07 22:20:46:
- assignee changed to: "msofer"
Ticket change [9dd75aeb28] (rid 96379) by dgp on 2003-11-13 08:32:14:
- foundin changed to: "obsolete: 8.4a4"
Ticket change [e1604e49f1] (rid 87435) by msofer on 2004-03-28 07:43:31:
- title changed to: "traces on array misbehaving (doc)"
Ticket change [509c9b7b31] (rid 126002) by msofer on 2004-03-28 07:59:43:
- icomment:
Logged In: YES user_id=148712 Docs added to array.n
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Closed"
- title changed to: "traces on array misbehaving"
- username: "msofer"
- icomment:
Ticket change [34474c56f5] (rid 106733) by msofer on 2004-03-28 07:59:44:
- closedate changed to: "2004-03-28T00:59:44"
- closer changed to: "msofer"