<i>vwait is not NRE-enabled, and yieldto cnot find the right splicing spot</i>.
by
.
D 2021-06-19T21:36:06.892
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment At\sleast\sas\sof\s[07f12cf7209a23fa3],\score-8-branch,\sthe\sscript\sbelow\saborts.\r\nThe\strouble\sbegins\swith\sthe\sC\sstack\sbeing\sbusy\sbecause\sc2\shas\sbeen\scalled\sfrom\r\nwith\s<code>vwait</code>,\swhich\sis\snot\syet\sNRE-enabled.\s\sAlthough\sthe\serror\r\nmessage\stalks\sabout\stailcall,\sit\sis\sreally\sabout\s<code>yieldto</code>,\swhich\r\ncalls\s<code>TclSetTailcall</code>.\r\n\r\n\r\n<code><verbatim>\r\nproc\smain_coro\s{}\s{\r\n\tset\sdone\s[catch\s{\r\n\t\tcoroutine\sc1\sp0\s\r\n\t\tyieldto\sc1\r\n\t\tcoroutine\sc2\sp1\r\n\t\tafter\s0\s[list\s[namespace\swhich\sc2]]\r\n\t\tvwait\sforever\s\r\n\t}\scres\scopts]\r\n}\r\n\r\nproc\sp0\s{}\s{\r\n\tyield\r\n\t::tailcall\smain\r\n}\r\n\r\nproc\sp1\s{}\s{\r\n\tyield\r\n\tset\sthis\s[info\scoroutine]\r\n\tset\sscript\s[list\s::yieldto\s[list\s$this]]\r\n\tyieldto\stry\s$script\son\serror\s{cres\scopt}\s"\r\n\t\tputs\s\\[list\suh-oh\s\\$cres]\r\n\t\t[list\s$this]\r\n\t"\r\n\tset\sscript\s[list\s::yieldto\s$this]\r\n\tyieldto\s::try\s$script\r\n}\r\n\r\n\r\ncoroutine\smain\smain_coro\r\n</verbatim></code>\r\n\r\n<b>Output:</b>\r\n\r\n<verbatim>\r\nuh-oh\s{cannot\syield:\sC\sstack\sbusy}\r\ntailcall\scannot\sfind\sthe\sright\ssplicing\sspot:\sshould\snot\shappen!\r\nAborted\s(core\sdumped)\r\n</verbatim>
J is_private 0
J login pooryorick
J priority 5\sMedium
J resolution None
J severity Critical
J status Open
J submitter pooryorick
J subsystem -\sNew\sBuiltin\sCommands
J title vwait\sis\snot\sNRE-enabled,\sand\syieldto\scnot\sfind\sthe\sright\ssplicing\sspot
J type Bug
K f9800d52bd61f240938dbd3c3c6364c8a6184194
U pooryorick
Z e4a05dc4997288aa384358f3f8ececef