Artifacts Associated With Ticket 1016167
Ticket change [03233c5b8b] (rid 119769) by dgp on 2004-08-25 17:27:34:
- assignee initialized to: "kennykb"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% namespace export after % namespace eval foo namespace import ::after % namespace origin foo::after ::after % foo::after 1 % namespace origin foo::after ::foo::after Tcl_AfterObjCmd incorrectly assumes that objv[0] holds the name of the built-in after command itself, and uses Tcl_SetCommandInfo to overwrite "itself" With [namespace import]ed commands, though, objv[0] is the [namespace import]-created command, not the original. The overwrite causes it to become an alternative implementation of [after], rather than an imported link to [after], as the different [namespace origin] results demonstrate.
- foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "03. Timer Events"
- title initialized to: "[after] overwrites its imports"
- type initialized to: "Bug"
Add attachment "1016167.patch" [a3c7a132f8] (rid 110098) by dgp on 2004-08-26 01:30:06.
Ticket change [8cce4be67b] (rid 127797) by dgp on 2004-08-26 01:30:06:
- icomment:
File Added - 99158: 1016167.patch Logged In: YES user_id=80530 Attached patch corrects this specific instance of the bug. Note that it makes use of the internal routine TclGetOriginalCommand to do so. Another fix would be to store [after]'s data directy in an Interp field, rather than in assocData and clientData (would also require internals privilege). Only fix that would be available to extensions would be to arrange for the Tcl_CreateObjCommand call that creates [after] to pass in a real ClientData value that allows space for mods on the fly. That fix would also take care of any other C-based wrappers, that, like [namespace import], lead to the result of Tcl_GetCommandFromObj(objv[0]) not being the struct that holds the current clientData. There appears to be no generally reliable way for a Tcl_ObjCmdProc to get at the Tcl_CmdInfo of the command currently being dispatched. In order to write to the ClientData, it needs to be originally set up with space to write on.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [585650de5a] (rid 117782) by dgp on 2004-08-26 01:50:52:
- icomment:
Logged In: YES user_id=80530 BTW, it appears that the "tclAfter" entry of interp assoc data is nowhere used. If that's confirmed, you might consider abolishing it. Hmmm.... I think I see. Since there's no Tcl_CmdDeleteProc registered for [after], the database of timer events isn't cleaned up if/when [after] is deleted. Storing it as assoc data at least sees that they are cleaned up on interp deletion. All this seems to suggest that [after] really wants a real Tcl_CreateObjCommand call so that it can customize the ClientData and Tcl_CmdDeleteProc to its needs.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [dce1d60226] (rid 114563) by dkf on 2004-08-26 04:54:53:
- icomment:
Logged In: YES user_id=79902 Ensemble -unknown callback handling was vulnerable to this sort of nonsense. That aspect is now Fixed (I had the command token handy anyway for cleanup.)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [a67f0b1a1d] (rid 98611) by dgp on 2004-08-26 05:25:09:
- foundin changed to: "obsolete: 8.5a2"
- icomment:
Logged In: YES user_id=80530 committed patch to HEAD as a workaround of the problem. Leaving open for the maintainer to provide a better fix.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dgp"
Ticket change [8cff22b855] (rid 127841) by kennykb on 2004-09-08 00:50:35:
- icomment:
Logged In: YES user_id=99768 Changes committed to HEAD - still need to backport to 8.4
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [45e832ff3c] (rid 99422) by kennykb on 2004-09-08 01:26:01:
- closedate changed to: "2004-09-07T18:26:01"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Changes backported, closing bug.
- login: "kennykb"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "kennykb"