Artifacts Associated With Ticket 3598150fffffffffffffffffffffffffffffffff
Ticket change [06f637206d] (rid 89303) by afredd on 2012-12-22 13:21:19:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
While skimming thro' the new 8.6 source code, i spotted something that lloked fishy in tclUtil.c. If TclDStringToObj() is called on a DString whose length is zero, but which has had its string allocated, then it still needs an explicit call to Tcl_DStringFree. The documentation suggests this is not necessary. It looks to me like the first if block: if (dsPtr->length == 0) is wrong and should be removed. I've not tested this, so i may be missing something obvious. Merry Xmas!
- foundin initialized to: "current: 8.6.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "afredd"
- subsystem initialized to: "None"
- title initialized to: "TclDStringToObj may trigger leak"
- type initialized to: "Bug"
Ticket change [148928c6dc] (rid 124410) by ferrieux on 2012-12-23 02:22:58:
- assignee changed to: "ferrieux"
- closedate changed to: "2012-12-22T19:22:58"
- closer changed to: "ferrieux"
- icomment:
Good catch ! Fixed in trunk. Note that, instead of purely removing that "if", I preserved it inside the static alloc case, because it corresponds to the overwhelming use case of a freshly created, empty DString, which deserves to be fast.
- login: "ferrieux"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- subsystem changed to: "41. Memory Allocation"
- username: "ferrieux"