Artifacts Associated With Ticket 1178805
Ticket change [ef33166b6c] (rid 108954) by msofer on 2005-04-07 19:41:28:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
[Patch 1158008] causes segfaults for extensions that expect that a call to Tcl_ListObj* functions shimmers the object to tclListType, as it will fail to meet that assumption for zero-length lists. Notable example is Tile [Bug 1177266]. Even though this is IMO a bug in the extension and not in Tcl, the cost of fixing that and avoiding the grief is relatively small: do make it a tclListObjType, and let FreeListInternalRep() do the right thing with it - ie, nothing.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "14. List Object"
- title initialized to: "empty lists cause nasty surprises"
- type initialized to: "Bug"
Ticket change [dbdb2a9c25] (rid 108034) by jenglish on 2005-04-08 02:53:54:
- icomment:
Logged In: YES user_id=68433 It's not entirely clear whether the manpage guarantees this behavior or not, but it does seem strongly implied. "If listPtr is not already a list object, Tcl_ListObjGetElements will attempt to convert it to one; if the conversion fails, it returns TCL_ERROR [ ... ] Otherwise it returns TCL_OK [...]" I always took that to mean that if Tcl_ListObjGetElements(..., objPtr, ..) returns TCL_OK, then objPtr is now a list object (which I also took to mean, "the typePtr and internal representation fields are set as described above").
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [ae82215dbb] (rid 101649) by msofer on 2005-04-17 04:02:44:
- assignee changed to: "kennykb"
- icomment:
Logged In: YES user_id=148712 The more I think about this, the less I think it is a Tcl bug. Extensions should not make assumptions about the internal rep of Tcl_Objs. The issue will raise again with the changes in numerical treatment, eg in calls to Tcl_GetDoubleFromObj: according to the docs it "converts" to a double, but it may not cause a shimmering of objs that have an integral string or internal rep (IIUC). Kevin: opinion?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [46b2678061] (rid 99561) by kennykb on 2005-04-19 22:14:48:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=99768 Opinion posted to tcl-core. Now we need to convince (or outvote) tclguy.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
Ticket change [2057c71792] (rid 91297) by hobbs on 2005-04-20 02:38:28:
- icomment:
Logged In: YES user_id=72656 As was noted on chat, extensions *have* to make assumptions about internal reps because that's often necessary in building your own new Tcl_Obj type. Whether Tcl_Obj users should do so is debatable, but the docs certainly allow it (currently).
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [087ed1c873] (rid 89570) by msofer on 2005-04-20 02:44:56:
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Retaking ownership, lest I forget to fix it by giving empty lists a tclListType. The wider discussion can continue in tcl-core
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "msofer"
Ticket change [f9a21d345b] (rid 91738) by dkf on 2005-04-20 16:56:01:
- icomment:
Logged In: YES user_id=79902 General note: extensions can make lots of assumptions about their own types of Tcl_Obj since they provide all the internal-rep management code for the type. The Q is about what assumptions can be made by code that is *not* managing the i-rep (e.g. extensions and the internal rep of lists, where all the official management code is in the Tcl core.)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [8c3a74c09f] (rid 127715) by jenglish on 2005-04-25 13:46:41:
- icomment:
Logged In: YES user_id=68433 See also #1189274, which appears to have the same root cause (a Tcl_Obj * known to be "of list type" but without a valid intrep).
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [cd0c3b3628] (rid 95808) by msofer on 2005-05-11 21:21:43:
- icomment:
Logged In: YES user_id=148712 Will go back to the 8.4 behaviour wrt to empty lists, and maybe consider a more radical 'all empty lists returned by list ops have a list internal rep' (see performance aspects of [Bug 1143805]). Review [concat] handling of list arguments, making use of the new facilities for shared listReps.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [776acb1000] (rid 89771) by dgp on 2006-03-10 10:03:55:
- icomment:
Logged In: YES user_id=80530 anything left to fix here for 8.4.13 or 8.5a4 ?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f638557629] (rid 130257) by nobody on 2006-03-10 12:17:29:
- icomment:
Logged In: NO > anything left to fix here for 8.4.13 or 8.5a4? Not that I know of -- the two known bugs that were triggered by the change have been fixed (one in Tile, another in the core itself), and the change itself has been reverted.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [070c77e063] (rid 89322) by msofer on 2006-03-10 23:22:02:
- closedate changed to: "2006-03-10T16:22:02"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Correction: the change itself has not been reverted, empty lists are not always converted to list type: the behaviour is not identical to 8.4 in this respect. Still, I'm satisfied with the current state and no recent complaints have been recorded. Setting to Pending, and opening a performance bug for empty lists as arguments to [concat].
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Pending"
- username: "msofer"
Ticket change [e349b4869e] (rid 87770) by sf-robot on 2006-03-25 10:22:13:
- closedate changed to: "2006-03-25T03:22:13"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"