Artifacts Associated With Ticket 2008248
Ticket change [1a890f96c5] (rid 122994) by ajpasadyn on 2008-07-01 20:51:39:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I found an issue while using TclBlend in Tcl 8.5, and the attached script demonstrates it. Basically, the conversion of an internal representation from list to dict is special cased to keep the representations of the elements, while the conversion from dict to list passes through a string-only representation. This appears even in code that does not explicitly use dict because the array get and set have changed to use dict now. TclBlend uses a special internal representation to hold references to Java objects, and if the internal representation is lost then the underlying object might get freed. This violates the "everything is a string" but in the past it's been sufficient to just make sure that the Tcl script itself was careful with the references it obtained. If the Tcl core changes internal representations beyond what is needed then an extension like this really does not seem to have much of a chance of working.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "ajpasadyn"
- subsystem initialized to: "14. List Object"
- title initialized to: "dict to list changes element representations"
- type initialized to: "Bug"
Add attachment "jtest.tcl" [6238afd5cf] (rid 92377) by ajpasadyn on 2008-07-02 03:51:39.
Ticket change [8cf179eaac] (rid 127825) by ajpasadyn on 2008-07-02 03:51:39:
- icomment:
File Added - 283351: jtest.tcl
- login: "ajpasadyn"
- mimetype: "text/plain"
- username: "ajpasadyn"
- icomment:
Ticket change [3179ac9852] (rid 93434) by ajpasadyn on 2008-07-02 03:54:39:
- icomment:
File Added - 283352: tcllist.patch Logged In: YES user_id=1055638 Originator: YES The attached patch seems to work for me, but I'd appreciate it if someone more familiar with this code could check it out. File Added: tcllist.patch
- login: "ajpasadyn"
- mimetype: "text/plain"
- username: "ajpasadyn"
- icomment:
Ticket change [f33d932967] (rid 129672) by ajpasadyn on 2008-07-02 05:33:59:
- icomment:
Logged In: YES user_id=1055638 Originator: YES OK there is definitely something wrong with that patch because I got a crash in clock format with it applied. I'll look at it some more, but hopefully it's more obvious to someone here.
- login: "ajpasadyn"
- mimetype: "text/plain"
- username: "ajpasadyn"
- icomment:
Ticket change [34d811c8f5] (rid 106816) by ajpasadyn on 2008-07-02 23:02:33:
- icomment:
File Deleted - 283352:
- login: "ajpasadyn"
- mimetype: "text/plain"
- username: "ajpasadyn"
- icomment:
Ticket change [06cd4da6da] (rid 89273) by ajpasadyn on 2008-07-02 23:07:27:
- icomment:
File Added - 283441: tcllist.patch Logged In: YES user_id=1055638 Originator: YES It appears my mistake was not always passing at least 1 to NewListIntRep. I've fixed that. The reason it crashed was that the core is calling SetListFromAny with a null interp from several places. I had copied the Tcl_SetObjResult call when NewListIntRep fails from the "from string rep" branch in the same routine, so it hadn't occurred to me it wasn't safe. File Added: tcllist.patch
- login: "ajpasadyn"
- mimetype: "text/plain"
- username: "ajpasadyn"
- icomment:
Add attachment "tcllist.patch" [5107f39d33] (rid 126067) by ajpasadyn on 2008-07-02 23:07:27.
Ticket change [f36265b72f] (rid 129701) by dkf on 2008-07-11 14:52:01:
- assignee changed to: "dkf"
Ticket change [19682ba172] (rid 122799) by dkf on 2008-07-11 17:39:45:
- foundin changed to: "obsolete: 8.5.3"
- icomment:
Logged In: YES user_id=79902 Originator: NO While Tcl's never guaranteed anything about representations, it would be nice to not lose them.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dkf"
Ticket change [6f05baa9c3] (rid 100239) by dkf on 2008-07-21 00:56:14:
- icomment:
Logged In: YES user_id=79902 Originator: NO Fixed on HEAD. Backport needed.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [62c240468f] (rid 92458) by dkf on 2008-07-21 05:06:20:
- closedate changed to: "2008-07-20T22:06:20"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Originator: NO Backported to 8.5 branch. Patch actually used takes some shortcuts that your suggestion didn't (since I know what the pre- and post-conditions on the core dict API functions are) but is otherwise the same. Thanks.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"