Artifacts Associated With Ticket 2577420fffffffffffffffffffffffffffffffff
Ticket change [a9c63dd97f] (rid 99210) by sbron on 2009-02-07 14:54:54:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl_GetInterpPath returns TCL_OK when called form within a Tcl_InterpDeleteProc that runs when the slave interp is deleted, but the path it produces is garbage. The following code prints some strange character when it is registered with Tcl_CallWhenDeleted for some slave interpreter and that interpreter is subsequently deleted. void InterpDelete(ClientData dummy, Tcl_Interp *interp) { Tcl_Interp *master; master = Tcl_GetMaster(interp); if (master != NULL) { Tcl_GetInterpPath(master, interp); printf("Path: %s\n", Tcl_GetStringResult(master)); } } Either the function should produce the correct path, or it should return TCL_ERROR. In the latter case it would also be helpful if the manual page would mention that this function cannot be used when the interp is in the process of being deleted. Problem was found on SuSE linux 11.0. - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "sbron"
- subsystem initialized to: "20. [interp]"
- title initialized to: "Tcl_GetInterpPath produces invalid path."
- type initialized to: "Bug"
Ticket change [791ccb2aeb] (rid 90066) by mistachkin on 2009-03-17 15:01:54:
- icomment:
This bug may be related to 1502071.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [e00998dbd8] (rid 115120) by mistachkin on 2009-03-17 15:06:52:
- icomment:
This bug may be related to 1502071.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [a65c5de9da] (rid 258473) by serhiy.storchaka on 2026-10-17 08:39:47:
- foundin changed to: "9.0.5, 9.1.0"
- icomment:
Still a use-after-free in 9.0 and 9.1 (ASan): the child's entry in the parent's child table is removed before the child's Tcl_CallWhenDeleted() callbacks run, and the InterpInfo may be freed before them too, because it is freed by another delete callback. 8.6 and 9.0 print the right path only because the freed memory still holds it. Proposed fix in branch [/timeline?r=interp-delete-callbacks-path|interp-delete-callbacks-path]: unlink after Tcl_DeleteInterp(), and free the InterpInfo after all delete callbacks. No test, since no script command can register such a callback.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
Ticket change [f51784e791] (rid 263409) by jan.nijtmans on 2026-11-27 15:15:32:
- assignee changed to: "aku"
- closer changed to: "nobody"
- comment changed to:
Tcl_GetInterpPath returns TCL_OK when called form within a Tcl_InterpDeleteProc that runs when the slave interp is deleted, but the path it produces is garbage. The following code prints some strange character when it is registered with Tcl_CallWhenDeleted for some slave interpreter and that interpreter is subsequently deleted. void InterpDelete(ClientData dummy, Tcl_Interp *interp) { Tcl_Interp *master; master = Tcl_GetMaster(interp); if (master != NULL) { Tcl_GetInterpPath(master, interp); printf("Path: %s\n", Tcl_GetStringResult(master)); } } Either the function should produce the correct path, or it should return TCL_ERROR. In the latter case it would also be helpful if the manual page would mention that this function cannot be used when the interp is in the process of being deleted. Problem was found on SuSE linux 11.0. - icomment:
I'm seeing (both on Windows and Linux: <pre> rename.test Test file error: child killed: segmentation violation </pre> So, something is wrong with this patch.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- severity changed to: "Minor"
Ticket change [2a7c5a9a24] (rid 263427) by serhiy.storchaka on 2026-11-27 19:21:56:
- icomment:
The rename.test segfault came from the branch: a child being deleted could still be deleted again by name. Fixed in [2a2b5c0667] on [/timeline?r=interp-delete-callbacks-path|interp-delete-callbacks-path].
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [f59237d845] (rid 263428) by jan.nijtmans on 2026-11-27 21:24:58:
- assignee changed to: "jan.nijtmans"
- icomment:
Now merged to [b428759224|trunk] Many thanks!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"