Overview
| Artifact ID: | b563407f82970fd9712cdc44b3047314223153ef |
|---|---|
| Ticket: | 3084489fffffffffffffffffffffffffffffffff
Serious issue: Tcl_DuplicateObj isn't making a copy? |
| User & Date: | anonymous on 2010-10-10 00:43:20 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
http://mkextensions.sourceforge.net/mkGeneric13.htm package provides C commands called lminus and linter. Under Tcl 8.4 the commands work as expected. Under Tcl 8.5.7 (running in AOLserver 4.5 on Windows, have not tested on any other platform), providing a pure tcl list (no string rep) as an argument to lminus will result in having the original list's list structure resorted. (In the scenario in which I discovered this, I actually see the string rep retain the original sequence even as list commands return data in different sequence from its string rep but I don't have a simple test case for that side-effect). As far as I can tell by looking at the source for this command, the first thing it does is Tcl_DuplicateObj (arvg[1]) (it uses a _DOB macro) and then performs its sort operation on the resulting object. Here is Tcl code you can use to replicate this problem: set listA [list c b a] set listB [list c b a z] lminus $listB $listA lindex $listA 0 - will return a instead of c Again lists must be pure. If you do set listA "c b a", the problem does not occur. Feel free to email to [email protected] with any questions
- foundin changed to: "obsolete: 8.5.7"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- subsystem changed to: "10. Objects"
- title changed to:
Serious issue: Tcl_DuplicateObj isn't making a copy?
- type changed to: "Bug"