Artifacts Associated With Ticket 1677512fffffffff
Ticket change [e0542986fc] (rid 115171) by dgp on 2007-03-09 18:37:47:
- assignee initialized to: "nijtmans"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The TclLsetFlat() routine appears to suffer from the same problem mentioned in 1675044. It is possible for an unshared "list" Tcl_Obj to have a List intrep that it shares with another Tcl_Obj. In TclLsetFlat, care is taken to avoid shared List intreps only when the Tcl_Obj itself is shared. Otherwise the direct surgery on the List struct might leak to other values. As with 1675044, it is remarkably difficult to construct a demo script for this possibility. Not accomplished so far.
- foundin initialized to: "obsolete: 8.5a6"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "14. List Object"
- title initialized to: "lset shared intrep bug"
- type initialized to: "Bug"
Ticket change [2da5f3bf47] (rid 119100) by dgp on 2007-03-14 02:18:35:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Originator: YES The actual value setting gets done by the TclListObjSetElement() routine, which does the right intrep sharing safety checks to avoid trouble.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- username: "dgp"
Ticket change [fe7a02fdea] (rid 108597) by dgp on 2007-03-15 00:50:03:
- icomment:
Logged In: YES user_id=80530 Originator: YES spoke too soon. here's the test: testConstraint testobj [llength [info commands testobj]] test lset-15.1 {lset: shared intrep [Bug 1677512]} -setup { teststringobj set 1 {{1 2} 3} testobj convert 1 list testobj duplicate 1 2 variable x [teststringobj get 1] variable y [teststringobj get 2] testobj freeallvars set l [list $y z] unset y } -constraints testobj -body { lset l 0 0 0 5 lindex $x 0 0 } -cleanup { unset -nocomplain x l } -result 1 - login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "None"
- username: "dgp"
- icomment:
Ticket change [906ec5468c] (rid 120451) by dgp on 2007-03-16 01:23:47:
- icomment:
File Added - 220723: 1677512.patch Logged In: YES user_id=80530 Originator: YES attached patch fixes the bug, but might possibly be too inefficient, by making surplus copies when the variable being [lset] holds an unshared value. File Added: 1677512.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [854aa5a6e4] (rid 131291) by dgp on 2007-03-17 01:07:41:
- icomment:
File Deleted - 220723: File Added - 220910: 1677512.patch Logged In: YES user_id=80530 Originator: YES Updated patch resolves the surplus copies problem. File Added: 1677512.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f5cdad0ec1] (rid 130176) by dgp on 2007-03-17 02:13:24:
- icomment:
Logged In: YES user_id=80530 Originator: YES Note that the rewritten TclLsetFlat in the patch explicitly calls Tcl_IncrRefCount(resultPtr) just before it returns resultPtr, to keep compat with the refCount conventions TclLsetFlat has always had. This increment no longer serves any purpose, so it could be dropped while changing all callers at the same time.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [78693a614f] (rid 89958) by dgp on 2007-03-17 12:08:27:
- icomment:
File Added - 220971: revised.patch Logged In: YES user_id=80530 Originator: YES Revised patch merges the two loops back into one, and starts to look more like the previous implementation. It still offers the possibility of dropping the artificial refcount bump of the returned value. File Added: revised.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1677512.patch" [3b1110f27b] (rid 112666) by dgp on 2007-03-18 02:00:49.
Ticket change [5b5357ea12] (rid 118300) by dgp on 2007-03-18 02:00:49:
- assignee changed to: "kennykb"
- icomment:
File Deleted - 220971: File Added - 221035: 1677512.patch Logged In: YES user_id=80530 Originator: YES Latest patch has much code cleanup and commentary. I think it's suitable for commit, with any further changes (refcount revision) to happen post commit. passing to kbk for review. File Added: 1677512.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [2321fb655f] (rid 130868) by kennykb on 2007-03-21 03:49:11:
- closedate changed to: "2007-03-20T20:49:11"
- closer changed to: "kennykb"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [ca8867c1c0] (rid 95365) by dgp on 2007-03-21 03:50:01:
- assignee changed to: "dgp"