Skip to content
Tcl Source Code History Of Ticket 3592747fffffffff
Login

History Of Ticket 3592747fffffffff

Artifacts Associated With Ticket 3592747fffffffff

  1. Ticket change [f01b04dae5] (rid 109123) by coldstore on 2012-12-05 08:40:10:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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.
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "coldstore"
    10. subsystem initialized to: "None"
    11. title initialized to: "yieldto failed to find the proper namespace Abort"
    12. type initialized to: "Bug"
  2. Ticket change [5a5aacc09f] (rid 118128) by coldstore on 2012-12-05 15:41:59:

    1. subsystem changed to: "60. NRE and coroutines"
  3. Ticket change [216959f721] (rid 130578) by msofer on 2012-12-05 17:36:45:

    1. icomment:
      1. no script to repro?
      2. any suggestion as to what should happen in that case? Would an error be in order?
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "msofer"
  4. Ticket change [dba2a226ba] (rid 107995) by msofer on 2012-12-05 17:45:00:

    1. icomment:
      Note: the problem is likely to appear also with [tailcall].
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  5. Ticket change [25566c21c4] (rid 88153) by msofer on 2012-12-06 09:39:05:

    1. icomment:
      The problem is indeed with [tailcall] whose guts are reused by [yieldto]. The current namespace was being cached in an nsNameType Tcl_Obj in order to insure its survival, and as a failure to resolve "could not happen" it was signaled by a panic. As colin is wont to do, he triggered the impossible! Fixed by using a better lifetime management of the namespace.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. title changed to:
      (tailcall|yieldto) failed to find the proper namespace Abort
      
    5. username: "msofer"
  6. Ticket change [c66f909656] (rid 121768) by msofer on 2013-03-19 21:02:55:

    1. assignee changed to: "coldstore"
    2. icomment:
      Is this bug still present?
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  7. Ticket change [8e6edf75e1] (rid 120105) by dkf on 2013-03-20 16:27:56:

    1. icomment:
      This is why it's great to have a test, so we can confirm when the bug is dead…
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  8. Ticket change [8efa4ae70f] (rid 164125) by pooryorick on 2018-06-23 17:00:22:

    1. assignee changed to: "aku"
    2. closer changed to: "nobody"
    3. 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.
      
    4. 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.
      
    5. login: "pooryorick"
    6. mimetype: "text/x-fossil-wiki"
    7. severity changed to: "Minor"
  9. Ticket change [fb4a33dde0] (rid 164126) by pooryorick on 2018-06-23 17:12:25:

    1. icomment:
      A slightly smaller example:
      
      <code><verbatim>
      namespace eval ns {
      	proc p args {
      		::tailcall [namespace current] {*}$args
      	}
      	namespace delete [namespace current]
      	p
      }
      </verbatim></code>
      
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
  10. Ticket change [550dd9940e] (rid 164127) by pooryorick on 2018-06-23 21:28:39:

    1. icomment:
      If <code>{*}</code> from the example the compiled path for <code>tailcall</code> is taken, and in the compiled variant an error is raised:
      
      <code><verbatim>
      namespace "::ns" not found
      </verbatim></code>
      
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
  11. Ticket change [3b249618d7] (rid 164133) by pooryorick on 2018-06-24 07:24:20:

    1. icomment:
      In [9198c16407f3] namespace handling is removed from
      <code>TclNRTailcallObjCmd</code>, allowing <code>TclNRTailcallObjCmd</code> to
      handle namespace issues later.  This aligns the behaviour of the non-compiled
      variant with the compiled one:  An error is produced if the namespace is not
      found.
      
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Remind"
  12. Ticket change [9d6a271afb] (rid 164223) by dgp on 2018-06-27 15:48:31:

    1. icomment:
      
      This is now fixed and the ticket can be closed?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  13. Ticket change [f6eb7e98ae] (rid 164254) by dgp on 2018-06-28 18:48:32:

    1. assignee changed to: "pooryorick"
    2. closedate changed to: "2458298.28370403"
    3. closer changed to: "dgp"
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"