Overview
| Artifact ID: | 8efa4ae70f476d103cc65a3f82826d62a90c03db5527cecce35055f8f46e7eaa |
|---|---|
| Ticket: | 3592747fffffffffffffffffffffffffffffffff
(tailcall|yieldto) failed to find the proper namespace Abort |
| User & Date: | pooryorick on 2018-06-23 17:00:22 |
Changes
- assignee changed to: "aku"
- closer changed to: "nobody"
- comment changed to:
Under some circumstances a coroutine can be invoked via ::yieldto while the namespace in which it resides is dying (nsPtr->flags&NS_DYING) This may occur, and is occuring, for example, when a TclOO object is being destroyed, and a coroutine within it is invoked by an event. The call to TclGetNamespaceFromObj() at tclBasic.c:8532 will indicate an error, because the current frame's namespace is not considered to match itself in the case that it is dying. I am unsure what the purpose of the test is, or under what circumstances the two namespaces might differ, but this abort occurs as a result of script evaluation, and hence should be considered a bug.
- icomment:
The following script reproduces the issue: <code><verbatim> namespace eval ns { proc p args { ::tailcall [namespace current] {*}$args } namespace eval [namespace current] { namespace delete [namespace current] p } } </verbatim></code> [https://core.tcl.tk/tips/doc/trunk/tip/498.md|TIP 498] is one solution to this issue. - login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- severity changed to: "Minor"