Artifacts Associated With Ticket 9d26c038b9
Ticket change [c167e95467] (rid 260406) by apnadkarni on 2026-10-25 02:31:55:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
As documented in the migration guide, since 9.0, `Tcl_ListObjIndex` may return ephemeral `Tcl_Obj` where the returned object is not owned by the (abstract) list implementation. The caller is supposed to take ownership (call IncrRef/DecrRef directly or by adding it to the interpreter result, another list etc.) or free it with `Tcl_BounceRefCount` to ensure unreferenced objects are freed. Lists created with `lseq` are an example. Several calls to `Tcl_ListObjIndex` do not doing this, both within core as well as in the included packages like ITcl and TDBC drivers, resulting in potential for memory leaks. This is not currently a major issue as lseq is the only such abstract list in the core and is unlikely to be passed as an argument in the context of the core calls where `Tcl_ListObjIndex` is invoked. Still, it would be advisable to fix this for the future where abstract lists, whether in the core or in extensions, might become more common.
- foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "Potential for memory leaks using Tcl_ListObjIndex"
- type initialized to: "Bug"
Ticket change [3e81b402a9] (rid 260408) by apnadkarni on 2026-10-25 03:17:39:
- login: "apnadkarni"
- mimetype: "text/plain"
- title changed to:
Potential for memory leaks using Tcl_ListObjIndex on abstract lists
Ticket change [54cec794d8] (rid 261310) by dkf on 2026-11-08 20:38:17:
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "14. List Object"