Artifacts Associated With Ticket 1655294fff
Ticket change [50ae5d3786] (rid 126016) by dgp on 2007-02-08 15:17:51:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I don't like the looks of this: % namespace eval x { proc die {} {namespace delete [namespace current]} proc test {} { set self [namespace which [lindex [info level 0] 0]] set ns [namespace qualifiers $self] puts "I am $self in namespace $ns which exists? [namespace exists $ns]" } } % namespace eval x { die test } I am ::x::test in namespace ::x which exists? 0 Once a namespace is deleted, I'd expect us not to find the commands in it anymore. - foundin initialized to: "obsolete: 8.4.15"
- 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: "21. [namespace]"
- title initialized to: "command found in deleted namespace"
- type initialized to: "Bug"
Ticket change [d3ce2e34e1] (rid 123347) by dgp on 2007-02-09 04:34:49:
- icomment:
File Added - 215126: 1655294.patch Logged In: YES user_id=80530 Originator: YES Here's a patch against core-8-4-branch that I'd like some opinions about. File Added: 1655294.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1655294.patch" [4cebd99e64] (rid 126975) by dgp on 2007-02-09 04:34:49.
Ticket change [041844a27e] (rid 119937) by msofer on 2007-09-10 07:22:14:
- icomment:
Logged In: YES user_id=148712 Originator: NO Your expectations collide with what is coded, apparently by design. The namespace ::x does not die when [namespace delete ::x] returns, but rather when the last CallFrame using ::x is popped; the comments at tclNamesp.c line 588 describe that: /* * If the namespace is on the call frame stack, it is marked as "dying" * (NS_DYING is OR'd into its flags): the namespace can't be looked up * by name but its commands and variables are still usable by those * active call frames. When all active call frames referring to the * namespace have been popped from the Tcl stack, Tcl_PopCallFrame will * call this procedure again to delete everything in the namespace. * If no nsName objects refer to the namespace (i.e., if its refCount * is zero), its commands and variables are deleted and the storage for * its namespace structure is freed. Otherwise, if its refCount is * nonzero, the namespace's commands and variables are deleted but the * structure isn't freed. Instead, NS_DEAD is OR'd into the structure's * flags to allow the namespace resolution code to recognize that the * namespace is "deleted". The structure's storage is freed by * FreeNsNameInternalRep when its refCount reaches 0. */ Note that this might just be a bug in [namespace which], it seems to be otherwise respected: % namespace eval x {die; ::x::test} invalid command name "::x::test" This being said: the precise going-ons on namespace deletion, especially wrt to the interplay with active call frames and deletion traces, is not specified anywhere but in code comments. Hard to say how much is really by actual design, as opposed to a least-bad judgment at the time it was coded. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [0c546f5a7b] (rid 114157) by msofer on 2009-05-01 08:30:09:
- priority changed to: "6"
Ticket change [15938ea3b3] (rid 124591) by msofer on 2009-05-03 23:26:45:
- icomment:
See also #2785893 and #2724403
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [dd74711689] (rid 114673) by msofer on 2010-01-04 03:38:33:
- icomment:
see patch at [Bug 2724403], which redefines the ns deletion sequence and fixes this: "Patch attached with new ns deletion policy: everything goes at once! Flag bits NS_DYING and NS_DEAD are removed, nsPtr->activationCount is history too. References are now all kept in nsPtr->refCount: nsName objs, CallFrames, parent namespace."
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [a42db71687] (rid 110169) by dgp on 2010-01-06 04:51:38:
- icomment:
I'm missing something? Bug 2724403 is Closed:Fixed, but I still see the demo script in this report producing the same arguably buggy results on the Tcl HEAD.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [1b5493e9d7] (rid 123129) by msofer on 2010-01-06 05:19:23:
- icomment:
Uh ... I wasn't very clear on that. Bug 2724403 had two ways of being fixed: #1 was by altering the ns deletion sequence, #2 by giving coros a special treatment. That bug was fixed in HEAD using #2, which has no effect on the issue in this ticket. The patch attached to that bug report (and NOT applied) uses approach #1 and should fix the present issue too.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [5ef2b0f515] (rid 115724) by msofer on 2011-04-12 09:37:20:
- assignee changed to: "dgp"
- closedate changed to: "2011-04-12T02:37:20"
- closer changed to: "msofer"
- status changed to: "Pending"
Ticket change [a04b1c4032] (rid 96778) by sf-robot on 2011-04-26 10:20:04:
- closedate changed to: "2011-04-26T03:20:04"
- closer changed to: "sf-robot"
- icomment:
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"
Ticket change [a46a960d6e] (rid 110204) by dgp on 2012-03-29 23:20:51:
- assignee changed to: "msofer"
- icomment:
allow_comments - 0
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "dgp"